From 2348f9106a5a5cfad04822cb8aadbfdf68866395 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Tue, 7 Nov 2006 12:34:27 +0000 Subject: [PATCH] fixed a potential bug in tag matching (should this one go to thiadmer) --HG-- extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%40159 --- sourcepawn/compiler/sc3.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sourcepawn/compiler/sc3.c b/sourcepawn/compiler/sc3.c index fe8e85ca..8bdeb43a 100644 --- a/sourcepawn/compiler/sc3.c +++ b/sourcepawn/compiler/sc3.c @@ -1782,7 +1782,7 @@ restart: if (lval2.ident==iARRAY || lval2.ident==iREFARRAY) error(33,lval2.sym->name); /* array must be indexed */ needtoken(close); - if (!matchtag(sym->x.tags.index,lval2.tag,TRUE)) + if ((sym->usage & uENUMROOT) && !matchtag(sym->x.tags.index,lval2.tag,TRUE)) error(213); if (lval2.ident==iCONSTEXPR) { /* constant expression */ stgdel(index,cidx); /* scratch generated code */