1.1 --- a/sourcepawn/compiler/sc3.c Thu Mar 01 04:18:23 2007 +0000
1.2 +++ b/sourcepawn/compiler/sc3.c Thu Mar 01 04:41:41 2007 +0000
1.3 @@ -1266,7 +1266,7 @@
1.4 * (a() ? return_array() : return_array()) ? return_array() : return_array()
1.5 */
1.6
1.7 -void dynarray_from_heaplist(memuse_list_t *heap)
1.8 +long dynarray_from_heaplist(memuse_list_t *heap)
1.9 {
1.10 memuse_t *use=heap->head;
1.11 memuse_t *tmp;
1.12 @@ -1281,6 +1281,7 @@
1.13 free(heap);
1.14 if (total)
1.15 setheap_save(-total*sizeof(cell));
1.16 + return total;
1.17 }
1.18
1.19 static int hier13(value *lval)
1.20 @@ -1291,6 +1292,7 @@
1.21 int flab2=getlabel();
1.22 value lval2={0};
1.23 int array1,array2;
1.24 + long total1,total2;
1.25 memuse_list_t *heap;
1.26
1.27 pushheaplist();
1.28 @@ -1309,7 +1311,7 @@
1.29 ldconst(lval->constval,sPRI);
1.30 sc_allowtags=(short)POPSTK_I(); /* restore */
1.31 heap=popsaveheaplist();
1.32 - dynarray_from_heaplist(heap);
1.33 + total1=dynarray_from_heaplist(heap);
1.34 pushheaplist();
1.35 jumplabel(flab2);
1.36 setlabel(flab1);
1.37 @@ -1331,9 +1333,9 @@
1.38 if (!matchtag(lval->tag,lval2.tag,FALSE))
1.39 error(213); /* tagname mismatch ('true' and 'false' expressions) */
1.40 heap=popsaveheaplist();
1.41 - dynarray_from_heaplist(heap);
1.42 + total2=dynarray_from_heaplist(heap);
1.43 setlabel(flab2);
1.44 - if (array1 && array2) {
1.45 + if ((array1 && array2) && (total1 && total2)) {
1.46 markheap(MEMUSE_DYNAMIC, 0);
1.47 }
1.48 if (lval->ident==iARRAY)