mirror of
https://github.com/alliedmodders/amxmodx.git
synced 2024-12-26 14:55:36 +03:00
Fixed bug where level>1 arrays were walked incorrectly
This commit is contained in:
parent
bece1e6d0c
commit
5705e69abb
@ -450,9 +450,14 @@ SC_FUNC stringlist *insert_dbgsymbol(symbol *sym)
|
|||||||
#endif
|
#endif
|
||||||
if (sym->ident==iARRAY || sym->ident==iREFARRAY) {
|
if (sym->ident==iARRAY || sym->ident==iREFARRAY) {
|
||||||
symbol *sub;
|
symbol *sub;
|
||||||
|
#if !defined NDEBUG
|
||||||
|
count = sym->dim.array.level;
|
||||||
|
#endif
|
||||||
strcat(string," [ ");
|
strcat(string," [ ");
|
||||||
for (sub=sym; sub!=NULL; sub=finddepend(sub)) {
|
for (sub=sym; sub!=NULL; sub=finddepend(sub)) {
|
||||||
assert(sub->dim.array.level==count++);
|
#if !defined NDEBUG
|
||||||
|
assert(sub->dim.array.level==count--);
|
||||||
|
#endif
|
||||||
sprintf(string+strlen(string),"%x:%x ",sub->x.idxtag,sub->dim.array.length);
|
sprintf(string+strlen(string),"%x:%x ",sub->x.idxtag,sub->dim.array.length);
|
||||||
} /* for */
|
} /* for */
|
||||||
strcat(string,"]");
|
strcat(string,"]");
|
||||||
|
Loading…
Reference in New Issue
Block a user