From b712d61b472e587a97c2f790ec49c13aaceedfe2 Mon Sep 17 00:00:00 2001 From: Borja Ferrer Date: Sat, 15 Jul 2006 19:23:07 +0000 Subject: [PATCH] improved error output for arrays using decl --HG-- extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%4032 --- sourcepawn/compiler/sc1.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sourcepawn/compiler/sc1.c b/sourcepawn/compiler/sc1.c index 27ce05dc..0a8e88b3 100644 --- a/sourcepawn/compiler/sc1.c +++ b/sourcepawn/compiler/sc1.c @@ -2339,8 +2339,11 @@ static cell initvector(int ident,int tag,cell size,int fillzero, } while (matchtoken(',')); /* do */ needtoken('}'); } else { - if (hadtoken && !autozero) + if (hadtoken && !autozero) { error(10); + lexclr(TRUE); /* drop the rest of the line */ + return 0; + } init(ident,&ctag,errorfound); if (!matchtag(tag,ctag,TRUE)) error(213); /* tagname mismatch */