Fix 'dcmp' (0) jump table decompression for large segment numbers

This commit is contained in:
dgelessus 2019-12-04 23:35:42 +01:00
parent 393160b5da
commit a4b6328782
2 changed files with 2 additions and 1 deletions

View File

@ -121,6 +121,7 @@ Version 1.6.1 (next version)
* The same optimization applies to the ``name`` attribute, although this is unlikely to make a difference in practice.
* As a result, it is no longer possible to construct ``Resource`` objects without a resource file. This was previously possible, but had no practical use.
* Fixed a small error in the ``'dcmp' (0)`` decompression implementation.
Version 1.6.0
^^^^^^^^^^^^^

View File

@ -119,7 +119,7 @@ def decompress_stream_inner(header_info: common.CompressedHeaderInfo, stream: ty
print(f"\t-> segment number: {segment_number_int:#x}")
# The tail part of all jump table entries (i. e. everything except for the address).
entry_tail = b"?<" + segment_number_int.to_bytes(2, "big", signed=True) + b"\xa9\xf0"
entry_tail = b"?<" + segment_number_int.to_bytes(2, "big", signed=False) + b"\xa9\xf0"
# The tail is output once *without* an address in front, i. e. the first entry's address must be generated manually by a previous code.
yield entry_tail