2
0
Fork 0

Bug fix: Big-Endian MIPS Volume Header boot file size was rounded up to full 2048. Thanks René Rebe.

Dieser Commit ist enthalten in:
Thomas Schmitt 2020-07-07 12:31:52 +02:00
Ursprung b0230b6ac8
Commit f962d0da66
1 geänderte Dateien mit 6 neuen und 3 gelöschten Zeilen

Datei anzeigen

@ -555,9 +555,12 @@ static int make_mips_volume_header(Ecma119Image *t, uint8_t *buf, int flag)
stream = iso_file_get_stream((IsoFile *) node);
file_size = iso_stream_get_size(stream);
/* Shall i really round up to 2048 ? Steve says yes.*/
iso_msb(buf + (72 + 16 * idx) + 12,
((file_size + 2047) / 2048 ) * 2048, 4);
/* genisoimage rounds up to full multiples of 2048.
libisofs did this too until 2020, but the arcload mips boot loader
throws error if the rounded size is stored here.
So now the exact bytecount gets stored.
*/
iso_msb(buf + (72 + 16 * idx) + 12, file_size, 4);
}