Skip to content

Commit 62c5df2

Browse files
authored
FIX: LDA file format termination block checksum
2 parents 098433a + ffc6b4a commit 62c5df2

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

process.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2217,7 +2217,10 @@ void process_pass2_done()
22172217
fatal_error("ERR6: Failed to write output file.\n");
22182218
total += byteswrit;
22192219

2220-
checksum = 0xf7;
2220+
checksum = 0;
2221+
for (int i = 0; i < 6; i++)
2222+
checksum -= ldaheaderbp[i];
2223+
22212224
bytestowrite = 1;
22222225
byteswrit = fwrite(&checksum, 1, bytestowrite, outfileobj);
22232226
if (byteswrit != bytestowrite)

0 commit comments

Comments
 (0)