DREAMWEB: Fixed continuing to another procedure. (axe misuse crash)

This commit is contained in:
Vladimir Menshakov 2011-06-24 09:34:23 +04:00
parent 7bdd3f3904
commit a5748a34af
2 changed files with 5 additions and 0 deletions

View File

@ -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)

View File

@ -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;