Merge remote-tracking branch 'yashas/i84-fix' into master

This commit is contained in:
Zeex 2017-05-01 10:29:17 +06:00
commit f1fec75bf4

View File

@ -2456,12 +2456,18 @@ static void initials(int ident,int tag,cell *size,int dim[],int numdim,
constvalue lastdim={NULL,"",0,0}; /* sizes of the final dimension */ constvalue lastdim={NULL,"",0,0}; /* sizes of the final dimension */
int skipdim=0; int skipdim=0;
if (dim[numdim-1]!=0) /* check if size specified for all dimensions */
*size=calc_arraysize(dim,numdim,0); /* calc. full size, if known */ for (idx=0; idx<numdim; idx++)
if (dim[idx]==0)
break;
/* already reserve space for the indirection tables (for an array with /* already reserve space for the indirection tables (for an array with
* known dimensions) * known dimensions)
* (do not use dumpzero(), as it bypasses the literal queue) * (do not use dumpzero(), as it bypasses the literal queue)
*/ */
if(idx==numdim)
*size=calc_arraysize(dim,numdim,0);
else
*size=0; /* size of one or more dimensions is unknown */
for (tablesize=calc_arraysize(dim,numdim-1,0); tablesize>0; tablesize--) for (tablesize=calc_arraysize(dim,numdim-1,0); tablesize>0; tablesize--)
litadd(0); litadd(0);
/* now initialize the sub-arrays */ /* now initialize the sub-arrays */