From 96c13416f141480f3d3552b1f4aad87a6af94e42 Mon Sep 17 00:00:00 2001 From: Sven Hesse Date: Tue, 23 Jun 2009 01:23:31 +0000 Subject: Stopping the seek() going into the header svn-id: r41798 --- engines/gob/script.cpp | 6 ++++++ 1 file changed, 6 insertions(+) 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; -- cgit v1.2.3