diff --git a/devtools/tasmrecover/tasm/cpp.py b/devtools/tasmrecover/tasm/cpp.py index 0196e5b45cf..dfdfb239f44 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 e92cd83c2b5..a5a47489489 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;