mirror of
https://github.com/alliedmodders/amxmodx.git
synced 2024-12-26 14:55:36 +03:00
Fixed bug at22981
This commit is contained in:
parent
bec98dcddd
commit
a4db0d927a
@ -676,6 +676,9 @@ SC_FUNC int expression(cell *val,int *tag,symbol **symptr,int chkfuncresult)
|
|||||||
|
|
||||||
if (lval.ident==iCONSTEXPR && val!=NULL) /* constant expression */
|
if (lval.ident==iCONSTEXPR && val!=NULL) /* constant expression */
|
||||||
*val=lval.constval;
|
*val=lval.constval;
|
||||||
|
if (lval.ident==iARRAY || lval.ident==iREFARRAY) {
|
||||||
|
error(13, lval.sym ? (lval.sym->name ? lval.sym->name : "-unknown-") : "-unknown-");
|
||||||
|
}
|
||||||
if (tag!=NULL)
|
if (tag!=NULL)
|
||||||
*tag=lval.tag;
|
*tag=lval.tag;
|
||||||
if (symptr!=NULL)
|
if (symptr!=NULL)
|
||||||
@ -1593,6 +1596,13 @@ restart:
|
|||||||
error(76); /* invalid function call, or syntax error */
|
error(76); /* invalid function call, or syntax error */
|
||||||
} /* if */
|
} /* if */
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
} else if (sym!=NULL && (lval1->ident==iARRAY || lval1->ident==iREFARRAY)) {
|
||||||
|
error(33, sym->name ? sym->name : "-unknown-"); /* the array was not indexed properly */
|
||||||
|
lval1->sym = NULL;
|
||||||
|
lval1->ident=iEXPRESSION;
|
||||||
|
lval1->constval=0;
|
||||||
|
lval1->tag=0;
|
||||||
|
return FALSE;
|
||||||
} /* if */
|
} /* if */
|
||||||
return lvalue;
|
return lvalue;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user