aboutsummaryrefslogtreecommitdiff
path: root/devtools/tasmrecover
diff options
context:
space:
mode:
authorVladimir2011-06-08 02:46:54 +0400
committerAlyssa Milburn2011-06-15 17:32:34 +0200
commit59f8d31132783439fed8a8475f17304faa8deb03 (patch)
tree0861d42b4296bcfe32793a4359f060cb933c2c16 /devtools/tasmrecover
parent7e56cc2d91a662694816dea0be69af4a013a7ea9 (diff)
downloadscummvm-rg350-59f8d31132783439fed8a8475f17304faa8deb03.tar.gz
scummvm-rg350-59f8d31132783439fed8a8475f17304faa8deb03.tar.bz2
scummvm-rg350-59f8d31132783439fed8a8475f17304faa8deb03.zip
DREAMWEB: fixed offsets shifting for db/dw
Diffstat (limited to 'devtools/tasmrecover')
-rw-r--r--devtools/tasmrecover/tasm/parser.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/devtools/tasmrecover/tasm/parser.py b/devtools/tasmrecover/tasm/parser.py
index 3eb553fdd1..2391aa442b 100644
--- a/devtools/tasmrecover/tasm/parser.py
+++ b/devtools/tasmrecover/tasm/parser.py
@@ -222,8 +222,9 @@ class parser:
self.set_global(cmd0, op.const(self.fix_dollar(v)))
elif cmd1 == 'db' or cmd1 == 'dw' or cmd1 == 'dd':
binary_width = {'b': 1, 'w': 2, 'd': 4}[cmd1[1]]
+ offset = len(self.binary_data)
self.binary_data += self.compact_data(binary_width, lex.parse_args(" ".join(cmd[2:])))
- self.set_global(cmd0.lower(), op.var(binary_width, len(self.binary_data)))
+ self.set_global(cmd0.lower(), op.var(binary_width, offset))
continue
elif cmd1 == 'proc':
name = cmd0.lower()