diff --git a/README.rst b/README.rst index 8e74db9..ab38b25 100644 --- a/README.rst +++ b/README.rst @@ -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 ^^^^^^^^^^^^^ diff --git a/rsrcfork/compress/dcmp0.py b/rsrcfork/compress/dcmp0.py index 1e58b4f..c40273e 100644 --- a/rsrcfork/compress/dcmp0.py +++ b/rsrcfork/compress/dcmp0.py @@ -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