From 053b522aff9bc45b0d9ba13fa00199c0bd18053e Mon Sep 17 00:00:00 2001 From: David Anderson Date: Wed, 6 Jul 2011 17:50:26 -0400 Subject: [PATCH] Fixed some vars not being marked for init on first compile pass (bug 4643, r=fyren). --- sourcepawn/compiler/sc3.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/sourcepawn/compiler/sc3.c b/sourcepawn/compiler/sc3.c index 9c71fa25..73c891d6 100644 --- a/sourcepawn/compiler/sc3.c +++ b/sourcepawn/compiler/sc3.c @@ -2386,7 +2386,14 @@ static int nesting=0; assert(sc_status==statFIRST || arg[argidx].ident == 0 || arg[argidx].tags!=NULL); switch (arg[argidx].ident) { case 0: + /* On the first pass, we donm't have all of the parameter info. + * Hpwever, use information must be marked anyway, otherwise vars + * declared previously will be omitted in the second psas. See + * SourceMod bug 4643. + */ error(92); /* argument count mismatch */ + if (lval.sym) + markusage(lval.sym, uREAD); break; case iVARARGS: /* always pass by reference */