From 13e8cf9ed83bb075ba2948b476968724e6c01376 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Wed, 9 Apr 2008 05:59:21 +0000 Subject: [PATCH] reverted compiler change that didn't work out so well --HG-- extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%402011 --- sourcepawn/compiler/sc1.c | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/sourcepawn/compiler/sc1.c b/sourcepawn/compiler/sc1.c index db539958..69fe95ba 100644 --- a/sourcepawn/compiler/sc1.c +++ b/sourcepawn/compiler/sc1.c @@ -2777,21 +2777,16 @@ static cell initarray(int ident,int tag,int dim[],int numdim,int cur, constvalue *enumroot,int *errorfound) { cell dsize,totalsize; - int idx,abortparse,needbrace; + int idx,abortparse; assert(cur>=0 && cur=0); assert(cur+2<=numdim);/* there must be 2 dimensions or more to do */ assert(errorfound!=NULL && *errorfound==FALSE); totalsize=0; - needbrace=1; needtoken('{'); for (idx=0,abortparse=FALSE; !abortparse; idx++) { - if (matchtoken('}')) - { - needbrace=0; - break; - } + /* In case the major dimension is zero, we need to store the offset * to the newly detected sub-array into the indirection table; i.e. * this table needs to be expanded and updated. @@ -2821,10 +2816,7 @@ static cell initarray(int ident,int tag,int dim[],int numdim,int cur, if (*errorfound || !matchtoken(',')) abortparse=TRUE; } /* for */ - if (needbrace) - { - needtoken('}'); - } + needtoken('}'); assert(counteddim!=NULL); if (counteddim[cur]>0) { if (idx