aboutsummaryrefslogtreecommitdiff
path: root/engines/gob/dataio.cpp
diff options
context:
space:
mode:
authorSven Hesse2008-05-04 03:32:23 +0000
committerSven Hesse2008-05-04 03:32:23 +0000
commit3ec47374b8f81a691be9e2bf6663775958997c25 (patch)
tree114cbd80c383c8ab8cd9b4f333f69f6623a7c85e /engines/gob/dataio.cpp
parentdfc7a242f55d78fc8a551fcef735f8b5b8e61235 (diff)
downloadscummvm-rg350-3ec47374b8f81a691be9e2bf6663775958997c25.tar.gz
scummvm-rg350-3ec47374b8f81a691be9e2bf6663775958997c25.tar.bz2
scummvm-rg350-3ec47374b8f81a691be9e2bf6663775958997c25.zip
Fixed DataStream::seek() (must have been drunk that day ;))
svn-id: r31857
Diffstat (limited to 'engines/gob/dataio.cpp')
-rw-r--r--engines/gob/dataio.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/engines/gob/dataio.cpp b/engines/gob/dataio.cpp
index ecd3181838..1fb43e96bb 100644
--- a/engines/gob/dataio.cpp
+++ b/engines/gob/dataio.cpp
@@ -84,12 +84,10 @@ uint32 DataStream::size() const {
void DataStream::seek(int32 offset, int whence) {
if (_stream)
_stream->seek(offset, whence);
-
- int32 resPos = _io->seekChunk(_handle, offset, whence);
- if (resPos != -1)
- return;
-
- _io->file_getHandle(_handle)->seek(offset, whence);
+ else if ((_handle < 50) || (_handle >= 128))
+ _io->file_getHandle(_handle)->seek(offset, whence);
+ else
+ _io->seekChunk(_handle, offset, whence);
}
bool DataStream::eos() const {