diff options
author | Eugene Sandulenko | 2006-05-18 00:20:53 +0000 |
---|---|---|
committer | Eugene Sandulenko | 2006-05-18 00:20:53 +0000 |
commit | 9103ddda4e5b70f106ea0a0e56d59c90fc7bbcb8 (patch) | |
tree | a157a8dbb685c430e8999379d4fd8adc2ede3459 /engines/scumm | |
parent | 14ec3f45fa08a0c0071693f4094fc088eb0062b5 (diff) | |
download | scummvm-rg350-9103ddda4e5b70f106ea0a0e56d59c90fc7bbcb8.tar.gz scummvm-rg350-9103ddda4e5b70f106ea0a0e56d59c90fc7bbcb8.tar.bz2 scummvm-rg350-9103ddda4e5b70f106ea0a0e56d59c90fc7bbcb8.zip |
Give more feedback to users who misused our SAN compression tool and ignored
FLU index for cideos which are used by INSANE.
svn-id: r22506
Diffstat (limited to 'engines/scumm')
-rw-r--r-- | engines/scumm/smush/chunk.cpp | 8 | ||||
-rw-r--r-- | engines/scumm/smush/chunk.h | 1 |
2 files changed, 8 insertions, 1 deletions
diff --git a/engines/scumm/smush/chunk.cpp b/engines/scumm/smush/chunk.cpp index a1c87fb912..7f409bce20 100644 --- a/engines/scumm/smush/chunk.cpp +++ b/engines/scumm/smush/chunk.cpp @@ -44,7 +44,8 @@ const char *Chunk::ChunkString(Chunk::type t) { BaseChunk::BaseChunk() : _type(0), _size(0), - _curPos(0) { + _curPos(0), + _name("") { } bool BaseChunk::eof() const { @@ -81,7 +82,11 @@ bool BaseChunk::seek(int32 delta, seek_type dir) { _curPos = (uint32)(_size + delta); break; } + if (_curPos > _size) { + if (g_scumm->_insaneRunning) { + warning("Looks like you compressed file %s in wrong way. It has FLU index which was not updated", _name.c_str()); + } error("invalid seek request : %d > %d (delta == %d)", _curPos, _size, delta); } return true; @@ -109,6 +114,7 @@ FileChunk::FileChunk(const Common::String &name, int offset) { _size = _data->readUint32BE(); _offset = _data->pos(); _curPos = 0; + _name = name; } FileChunk::~FileChunk() { diff --git a/engines/scumm/smush/chunk.h b/engines/scumm/smush/chunk.h index 9c910dfb23..7d5b1926fa 100644 --- a/engines/scumm/smush/chunk.h +++ b/engines/scumm/smush/chunk.h @@ -57,6 +57,7 @@ protected: Chunk::type _type; uint32 _size; uint32 _curPos; + Common::String _name; BaseChunk(); |