diff options
author | Filippos Karapetis | 2015-10-22 12:14:43 +0300 |
---|---|---|
committer | Filippos Karapetis | 2015-11-19 02:05:12 +0200 |
commit | 7707f053389f2c4ef8491be611d32615eb529f73 (patch) | |
tree | 092994bcc883392c4652573c5efd85d97eec5625 | |
parent | 65a36315eab3f821e0fff232b32d6b58110804f9 (diff) | |
download | scummvm-rg350-7707f053389f2c4ef8491be611d32615eb529f73.tar.gz scummvm-rg350-7707f053389f2c4ef8491be611d32615eb529f73.tar.bz2 scummvm-rg350-7707f053389f2c4ef8491be611d32615eb529f73.zip |
COMMON: Throw a warning on inconsistent DCL fixed size buffers
This is useful for debugging, and needed for fixes in Russian fan made
translations of The Neverhood Chronicles
-rw-r--r-- | common/dcl.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/common/dcl.cpp b/common/dcl.cpp index 5993c218cb..66dfb76b2a 100644 --- a/common/dcl.cpp +++ b/common/dcl.cpp @@ -449,6 +449,8 @@ bool DecompressorDCL::unpack(SeekableReadStream *sourceStream, WriteStream *targ } if (_targetFixedSize) { + if (_bytesWritten != _targetSize) + warning("DCL-INFLATE Error: Inconsistent bytes written (%d) and target buffer size (%d)", _bytesWritten, _targetSize); return _bytesWritten == _targetSize; } return true; // For targets featuring dynamic size we always succeed |