aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVladimir Menshakov2011-06-24 09:34:23 +0400
committerVladimir Menshakov2011-06-24 09:34:23 +0400
commita5748a34afe9ae837b14f26f69d6b3518ef91966 (patch)
tree0765cc5c6d876c3bc4a3c165e61d6e877b685485
parent7bdd3f3904828704d48e8b0a60fcfeab27f4287b (diff)
downloadscummvm-rg350-a5748a34afe9ae837b14f26f69d6b3518ef91966.tar.gz
scummvm-rg350-a5748a34afe9ae837b14f26f69d6b3518ef91966.tar.bz2
scummvm-rg350-a5748a34afe9ae837b14f26f69d6b3518ef91966.zip
DREAMWEB: Fixed continuing to another procedure. (axe misuse crash)
-rw-r--r--devtools/tasmrecover/tasm/cpp.py2
-rw-r--r--engines/dreamweb/dreamgen.cpp3
2 files changed, 5 insertions, 0 deletions
diff --git a/devtools/tasmrecover/tasm/cpp.py b/devtools/tasmrecover/tasm/cpp.py
index 0196e5b45c..dfdfb239f4 100644
--- a/devtools/tasmrecover/tasm/cpp.py
+++ b/devtools/tasmrecover/tasm/cpp.py
@@ -466,7 +466,9 @@ namespace %s {
self.resolve_label(s.label)
#adding statements
+ #BIG FIXME: this is quite ugly to handle code analysis from the code generation. rewrite me!
for label, proc, offset in self.unbounded:
+ self.body += "\treturn;\n" #we need to return before calling code from the other proc
self.body += "/*continuing to unbounded code: %s from %s:%d-%d*/\n" %(label, proc.name, offset, len(proc.stmts))
start = len(self.proc.stmts)
self.proc.add_label(label)
diff --git a/engines/dreamweb/dreamgen.cpp b/engines/dreamweb/dreamgen.cpp
index e92cd83c2b..a5a4748948 100644
--- a/engines/dreamweb/dreamgen.cpp
+++ b/engines/dreamweb/dreamgen.cpp
@@ -3482,6 +3482,7 @@ atlast4:
bx = pop();
es = pop();
data.byte(kLockstatus) = 1;
+ return;
/*continuing to unbounded code: shutdoor from dodoor:60-87*/
shutdoor:
cl = es.byte(bx+19);
@@ -6737,6 +6738,7 @@ doopeninv:
delpointer();
data.byte(kOpenedob) = 255;
goto waitexam;
+ return;
/*continuing to unbounded code: examineagain from examineob:3-66*/
examineagain:
data.byte(kInmaparea) = 0;
@@ -13187,6 +13189,7 @@ void DreamGenContext::useaxe() {
return;
notinpool:
showfirstuse();
+ return;
/*continuing to unbounded code: axeondoor from useelvdoor:19-30*/
axeondoor:
al = 15;