1.1 --- a/sourcepawn/compiler/sc2.c Fri May 09 12:32:49 2014 -0700
1.2 +++ b/sourcepawn/compiler/sc2.c Fri May 09 23:17:14 2014 -0400
1.3 @@ -2461,6 +2461,16 @@
1.4 free_symbol(sym);
1.5 }
1.6
1.7 +SC_FUNC int get_actual_compound(symbol *sym)
1.8 +{
1.9 + if (sym->ident == iARRAY || sym->ident == iREFARRAY) {
1.10 + while (sym->parent)
1.11 + sym = sym->parent;
1.12 + }
1.13 +
1.14 + return sym->compound;
1.15 +}
1.16 +
1.17 SC_FUNC void delete_symbols(symbol *root,int level,int delete_labels,int delete_functions)
1.18 {
1.19 symbol *origRoot=root;
1.20 @@ -2472,7 +2482,7 @@
1.21 * specified nesting level */
1.22 while (root->next!=NULL) {
1.23 sym=root->next;
1.24 - if (sym->compound<level)
1.25 + if (get_actual_compound(sym)<level)
1.26 break;
1.27 switch (sym->ident) {
1.28 case iLABEL: