mirror of
https://github.com/alliedmodders/amxmodx.git
synced 2024-12-25 22:35:37 +03:00
Compiler: Fix crash when using tagof(tagname:)
Imported from SA-MP: 53ef10ffc7
This commit is contained in:
parent
b2442a2268
commit
92255bcdc3
@ -1129,6 +1129,7 @@ static int hier2(value *lval)
|
|||||||
symbol *sym=NULL;
|
symbol *sym=NULL;
|
||||||
int saveresult;
|
int saveresult;
|
||||||
|
|
||||||
|
sym = NULL;
|
||||||
tok=lex(&val,&st);
|
tok=lex(&val,&st);
|
||||||
switch (tok) {
|
switch (tok) {
|
||||||
case tINC: /* ++lval */
|
case tINC: /* ++lval */
|
||||||
@ -1293,7 +1294,7 @@ static int hier2(value *lval)
|
|||||||
return error(17,st); /* undefined symbol (symbol is in the table, but it is "used" only) */
|
return error(17,st); /* undefined symbol (symbol is in the table, but it is "used" only) */
|
||||||
tag=sym->tag;
|
tag=sym->tag;
|
||||||
} /* if */
|
} /* if */
|
||||||
if (sym->ident==iARRAY || sym->ident==iREFARRAY) {
|
if (sym!=NULL && (sym->ident==iARRAY || sym->ident==iREFARRAY)) {
|
||||||
int level;
|
int level;
|
||||||
symbol *idxsym=NULL;
|
symbol *idxsym=NULL;
|
||||||
for (level=0; matchtoken('['); level++) {
|
for (level=0; matchtoken('['); level++) {
|
||||||
|
Loading…
Reference in New Issue
Block a user