aboutsummaryrefslogtreecommitdiff
path: root/engines/gob/inter_v1.cpp
diff options
context:
space:
mode:
authorMax Horn2009-03-05 20:37:53 +0000
committerMax Horn2009-03-05 20:37:53 +0000
commit05b4370c21b3abf7a1ff6aa83194cf95ab73579c (patch)
treea4d2cecedc5735d3205489e50610f85ca57be348 /engines/gob/inter_v1.cpp
parent2017d1c9ea12968e80a7aaeed1d9289f39c3a96e (diff)
downloadscummvm-rg350-05b4370c21b3abf7a1ff6aa83194cf95ab73579c.tar.gz
scummvm-rg350-05b4370c21b3abf7a1ff6aa83194cf95ab73579c.tar.bz2
scummvm-rg350-05b4370c21b3abf7a1ff6aa83194cf95ab73579c.zip
Fix for bug #2664460: Various SeekableReadStream::seek() implementations (as well as our unit tests, ouch) handled SEEK_END incorrectly (using -offset instead of offset), contrary to what the docs said and what fseek does. Hopefully I found and fixed all affected parts, but still watch out for regressions
svn-id: r39135
Diffstat (limited to 'engines/gob/inter_v1.cpp')
-rw-r--r--engines/gob/inter_v1.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/engines/gob/inter_v1.cpp b/engines/gob/inter_v1.cpp
index b6b82662bc..9c4679ca35 100644
--- a/engines/gob/inter_v1.cpp
+++ b/engines/gob/inter_v1.cpp
@@ -2222,7 +2222,7 @@ bool Inter_v1::o1_readData(OpFuncParams &params) {
_vm->_draw->animateCursor(4);
if (offset < 0)
- stream->seek(-offset - 1, SEEK_END);
+ stream->seek(offset + 1, SEEK_END);
else
stream->seek(offset);