fixed amb1400 - invalid dereference caused crash in ternary operators
--HG-- extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%401862
This commit is contained in:
parent
38012bf3e6
commit
85eaa31374
@ -1329,7 +1329,9 @@ static int hier13(value *lval)
|
|||||||
array1= (lval->ident==iARRAY || lval->ident==iREFARRAY);
|
array1= (lval->ident==iARRAY || lval->ident==iREFARRAY);
|
||||||
array2= (lval2.ident==iARRAY || lval2.ident==iREFARRAY);
|
array2= (lval2.ident==iARRAY || lval2.ident==iREFARRAY);
|
||||||
if (array1 && !array2) {
|
if (array1 && !array2) {
|
||||||
char *ptr=(lval->sym->name!=NULL) ? lval->sym->name : "-unknown-";
|
const char *ptr = "-unknown-";
|
||||||
|
if (lval->sym != NULL && lval->sym->name != NULL)
|
||||||
|
ptr = lval->sym->name;
|
||||||
error(33,ptr); /* array must be indexed */
|
error(33,ptr); /* array must be indexed */
|
||||||
} else if (!array1 && array2) {
|
} else if (!array1 && array2) {
|
||||||
char *ptr=(lval2.sym->name!=NULL) ? lval2.sym->name : "-unknown-";
|
char *ptr=(lval2.sym->name!=NULL) ? lval2.sym->name : "-unknown-";
|
||||||
|
Loading…
Reference in New Issue
Block a user