mirror of
https://github.com/scummvm/scummvm.git
synced 2026-06-20 05:45:29 +00:00
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
This commit is contained in:
@@ -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() {
|
||||
|
||||
@@ -57,6 +57,7 @@ protected:
|
||||
Chunk::type _type;
|
||||
uint32 _size;
|
||||
uint32 _curPos;
|
||||
Common::String _name;
|
||||
|
||||
BaseChunk();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user