aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSven Hesse2009-06-23 01:23:31 +0000
committerSven Hesse2009-06-23 01:23:31 +0000
commit96c13416f141480f3d3552b1f4aad87a6af94e42 (patch)
tree32522e5d2dc9a65e68a3075c20c7e016ec9848ef
parentfcddd5c69a2b7f6496d76af09786c10db042fe7a (diff)
downloadscummvm-rg350-96c13416f141480f3d3552b1f4aad87a6af94e42.tar.gz
scummvm-rg350-96c13416f141480f3d3552b1f4aad87a6af94e42.tar.bz2
scummvm-rg350-96c13416f141480f3d3552b1f4aad87a6af94e42.zip
Stopping the seek() going into the header
svn-id: r41798
-rw-r--r--engines/gob/script.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/engines/gob/script.cpp b/engines/gob/script.cpp
index 72085ed756..d5dc53284e 100644
--- a/engines/gob/script.cpp
+++ b/engines/gob/script.cpp
@@ -107,6 +107,12 @@ bool Script::seek(int32 offset, int whence) {
if ((offset < 0) || (((uint32) offset) >= _totSize))
return false;
+ // Cannot seek into the header
+ if (offset < 128) {
+ _finished = true;
+ return false;
+ }
+
// A successful seek means the script file continues to be executed
_finished = false;