diff options
author | Filippos Karapetis | 2013-09-26 10:46:09 +0300 |
---|---|---|
committer | Filippos Karapetis | 2013-09-26 10:46:09 +0300 |
commit | dca513dc207779bfd36a1c71e3712405a1d9856d (patch) | |
tree | 6daf77868844725a37369333b8387c4f5b6df6b9 /common/dcl.cpp | |
parent | a5691e8dc85bb1f7aee237529983f6fbab61c89d (diff) | |
download | scummvm-rg350-dca513dc207779bfd36a1c71e3712405a1d9856d.tar.gz scummvm-rg350-dca513dc207779bfd36a1c71e3712405a1d9856d.tar.bz2 scummvm-rg350-dca513dc207779bfd36a1c71e3712405a1d9856d.zip |
COMMON: Expand the warnings thrown for broken DCL compressed data
The Russian translated versions of Neverhood have invalid unpacked
sizes for some compressed resources. This helps in identifying their
resource parameters more easily
Diffstat (limited to 'common/dcl.cpp')
-rw-r--r-- | common/dcl.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/common/dcl.cpp b/common/dcl.cpp index 1879be992d..87ec0ad915 100644 --- a/common/dcl.cpp +++ b/common/dcl.cpp @@ -371,12 +371,14 @@ bool DecompressorDCL::unpack(ReadStream *src, byte *dest, uint32 nPacked, uint32 debug(8, "\nCOPY(%d from %d)\n", val_length, val_distance); if (val_length + _dwWrote > _szUnpacked) { - warning("DCL-INFLATE Error: Write out of bounds while copying %d bytes", val_length); + warning("DCL-INFLATE Error: Write out of bounds while copying %d bytes (declared unpacked size is %d bytes, current is %d + %d bytes)", + val_length, _szUnpacked, _dwWrote, val_length); return false; } if (_dwWrote < val_distance) { - warning("DCL-INFLATE Error: Attempt to copy from before beginning of input stream"); + warning("DCL-INFLATE Error: Attempt to copy from before beginning of input stream (declared unpacked size is %d bytes, current is %d bytes)", + _szUnpacked, _dwWrote); return false; } |