Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit bc6bc67

Browse files
committed
GP-0: Formatting
1 parent a6cca75 commit bc6bc67

File tree

1 file changed

+5
-3
lines changed
  • Ghidra/Features/Base/src/main/java/ghidra/app/util/opinion

1 file changed

+5
-3
lines changed

Ghidra/Features/Base/src/main/java/ghidra/app/util/opinion/MzLoader.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,8 @@ private void processMemoryBlocks(Program program, FileBytes fileBytes,
187187
knownSegments.add(space.getAddress((INITIAL_SEGMENT_VAL + header.e_cs()) & 0xffff, 0));
188188
}
189189
// Allocate an initialized memory block for each segment we know about
190-
int endOffset = pagesToBytes(Short.toUnsignedInt(header.e_cp()) - 1) + Short.toUnsignedInt(header.e_cblp());
190+
int endOffset = pagesToBytes(Short.toUnsignedInt(header.e_cp()) - 1) +
191+
Short.toUnsignedInt(header.e_cblp());
191192
if (endOffset > reader.length()) {
192193
log.appendMsg(
193194
"File is 0x%x bytes but header reports 0x%x".formatted(reader.length(), endOffset));
@@ -475,7 +476,8 @@ private Set<RelocationFixup> getRelocationFixups(SegmentedAddressSpace space,
475476
* @return The segmented addresses converted to a file offset
476477
*/
477478
private int addressToFileOffset(int segment, int offset, OldDOSHeader header) {
478-
return (short) segment * 16 + offset + paragraphsToBytes(Short.toUnsignedInt(header.e_cparhdr()));
479+
return (short) segment * 16 + offset +
480+
paragraphsToBytes(Short.toUnsignedInt(header.e_cparhdr()));
479481
}
480482

481483
/**
@@ -489,7 +491,7 @@ private int paragraphsToBytes(int paragraphs) {
489491
}
490492

491493
/**
492-
* Converts pages to bytes. There are 512 bytes in a paragraph.
494+
* Converts pages to bytes. There are 512 bytes in a page.
493495
*
494496
* @param pages The number of pages
495497
* @return The number of bytes in the given number of pages

0 commit comments

Comments
 (0)