fixed a regression bug from the last commit
authorDavid Anderson <dvander@alliedmods.net>
Sat Jul 07 16:21:34 2007 +0000 (2007-07-07)
changeset 1045b0a797575420
parent 1044 ff0047e53c65
child 1046 1072caab8a65
fixed a regression bug from the last commit
sourcepawn/compiler/sc1.c
     1.1 --- a/sourcepawn/compiler/sc1.c	Sat Jul 07 15:36:54 2007 +0000
     1.2 +++ b/sourcepawn/compiler/sc1.c	Sat Jul 07 16:21:34 2007 +0000
     1.3 @@ -2517,11 +2517,11 @@
     1.4   *  Global references: litidx (altered)
     1.5   */
     1.6  static void initials2(int ident,int tag,cell *size,int dim[],int numdim,
     1.7 -                     constvalue *enumroot, int eq_match_override)
     1.8 +                     constvalue *enumroot, int eq_match_override, int curlit_override)
     1.9  {
    1.10    int ctag;
    1.11    cell tablesize;
    1.12 -  int curlit=litidx;
    1.13 +  int curlit=(curlit_override == -1) ? litidx : curlit_override;
    1.14    int err=0;
    1.15  
    1.16    if (eq_match_override == -1) {
    1.17 @@ -2633,7 +2633,7 @@
    1.18  static void initials(int ident,int tag,cell *size,int dim[],int numdim,
    1.19  					 constvalue *enumroot)
    1.20  {
    1.21 -  initials2(ident, tag, size, dim, numdim, enumroot, -1);
    1.22 +  initials2(ident, tag, size, dim, numdim, enumroot, -1, -1);
    1.23  }
    1.24  
    1.25  static cell initarray(int ident,int tag,int dim[],int numdim,int cur,
    1.26 @@ -4417,7 +4417,7 @@
    1.27            }
    1.28          }
    1.29        } else {
    1.30 -        initials2(ident,tags[0],&size,arg->dim,arg->numdim,enumroot, 1);
    1.31 +        initials2(ident,tags[0],&size,arg->dim,arg->numdim,enumroot, 1, 0);
    1.32          assert(size>=litidx);
    1.33          /* allocate memory to hold the initial values */
    1.34          arg->defvalue.array.data=(cell *)malloc(litidx*sizeof(cell));