From ec206be55a3878b90f10ccab9f585f02f3741715 Mon Sep 17 00:00:00 2001 From: Spoike Date: Wed, 22 Dec 2010 00:33:19 +0000 Subject: [PATCH] divVerent's patch to enable subscoped locals, not sure if subscoped_away is required, but committing that anyway. Its copied from pastebin, so sorry for conflicts. git-svn-id: https://svn.code.sf.net/p/fteqw/code/branches/wip@3705 fc73d0e0-1445-4013-8a0c-d673dee63da5 --- engine/qclib/qcc_pr_comp.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/engine/qclib/qcc_pr_comp.c b/engine/qclib/qcc_pr_comp.c index 4a2c3d349..2cb7e2158 100644 --- a/engine/qclib/qcc_pr_comp.c +++ b/engine/qclib/qcc_pr_comp.c @@ -5538,9 +5538,13 @@ void QCC_PR_ParseStatement (void) if (pr_subscopedlocals) { - for (e2 = pr.localvars; e2 != e; e2 = e2->nextlocal) + for (e2 = pr.localvars; e2 != e; e2 = e2->nextlocal) { - Hash_RemoveData(&localstable, e2->name, e2); + if (!e2->subscoped_away) + { + Hash_RemoveData(&localstable, e2->name, e2); + e2->subscoped_away = true; + } } } return;