From 45d058958568087fd724bc9904e4010fff444997 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Mon, 7 May 2007 04:17:24 +0000 Subject: [PATCH] fixed a serious codegen bug where for loops with no variable declarations would misalign the internal stack tracker of the compiler --HG-- extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%40760 --- sourcepawn/compiler/sc1.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sourcepawn/compiler/sc1.c b/sourcepawn/compiler/sc1.c index f5b7892c..0e62d854 100644 --- a/sourcepawn/compiler/sc1.c +++ b/sourcepawn/compiler/sc1.c @@ -5868,6 +5868,8 @@ static int dofor(void) declared=save_decl; delete_symbols(&loctab,nestlevel,FALSE,TRUE); nestlevel=save_nestlevel; /* reset 'compound statement' nesting level */ + } else { + popstacklist(0); } /* if */ index=endlessloop ? tENDLESS : tFOR;