From 5981194db46d167a93e1573184acf4020103cee5 Mon Sep 17 00:00:00 2001 From: Spoike Date: Tue, 26 Oct 2004 14:39:55 +0000 Subject: [PATCH] fixed a pretty major bug with continue used within a while. Fixed working of assignments to other vars. git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@364 fc73d0e0-1445-4013-8a0c-d673dee63da5 --- engine/qclib/qcc_pr_comp.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/engine/qclib/qcc_pr_comp.c b/engine/qclib/qcc_pr_comp.c index ca35733dc..2198c9483 100644 --- a/engine/qclib/qcc_pr_comp.c +++ b/engine/qclib/qcc_pr_comp.c @@ -4237,7 +4237,7 @@ void QCC_PR_ParseStatement (void) for(i = breaks; i < num_breaks; i++) { patch1 = &statements[pr_breaks[i]]; - statements[pr_breaks[i]].a = &statements[numstatements] - patch1; + statements[pr_breaks[i]].a = &statements[numstatements] - patch1; //jump to after the return-to-top goto } num_breaks = breaks; } @@ -4246,7 +4246,7 @@ void QCC_PR_ParseStatement (void) for(i = continues; i < num_continues; i++) { patch1 = &statements[pr_continues[i]]; - statements[pr_continues[i]].a = patch1 - patch2; + statements[pr_continues[i]].a = patch2 - patch1; //jump back to top } num_continues = continues; } @@ -6676,6 +6676,8 @@ void QCC_PR_ParseDefs (char *classname) for (i = 0; i < d->type->size; i++) G_INT(def->ofs) = G_INT(d->ofs); + QCC_PR_Lex(); + continue; } else if (type->type == ev_function)