aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenis Kasak2009-07-08 06:14:17 +0000
committerDenis Kasak2009-07-08 06:14:17 +0000
commit6b2991f488c4634f5663eb0734e543d311b82f84 (patch)
tree59d0ce4038b45c247bbd647724f81ec6abbd897a
parent0ec737db69cd838a9522aea7cdebe6d5bd9a1b60 (diff)
downloadscummvm-rg350-6b2991f488c4634f5663eb0734e543d311b82f84.tar.gz
scummvm-rg350-6b2991f488c4634f5663eb0734e543d311b82f84.tar.bz2
scummvm-rg350-6b2991f488c4634f5663eb0734e543d311b82f84.zip
Made Script::run() seek in SEEK_CUR mode when jumping instead of the default SEEK_SET. It also now checks whether there is a non-zero jump value set before doing the jump.
svn-id: r42254
-rw-r--r--engines/draci/script.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/engines/draci/script.cpp b/engines/draci/script.cpp
index c676ef9d46..c63c9faea6 100644
--- a/engines/draci/script.cpp
+++ b/engines/draci/script.cpp
@@ -450,7 +450,8 @@ int Script::run(GPL2Program program, uint16 offset) {
reader.pos(), _jump, reader.pos() + _jump);
// Account for GPL jump that some commands set
- reader.seek(reader.pos() + _jump);
+ if (_jump != 0)
+ reader.seek(_jump, SEEK_CUR);
// Reset jump
_jump = 0;