mirror of
https://github.com/86Box/bios-tools.git
synced 2026-02-25 04:45:32 -07:00
Truncate extra byte when extracting OMF payloads
This commit is contained in:
@@ -1751,6 +1751,11 @@ class OMFExtractor(Extractor):
|
||||
data = in_f.read(1048576)
|
||||
out_f.write(data)
|
||||
|
||||
# Truncate payloads with an extra byte.
|
||||
pos = out_f.tell()
|
||||
if pos & 1:
|
||||
out_f.truncate(pos - 1)
|
||||
|
||||
out_f.close()
|
||||
except:
|
||||
in_f.close()
|
||||
|
||||
Reference in New Issue
Block a user