1
0
mirror of https://github.com/cc65/cc65.git synced 2025-01-24 04:34:35 +00:00

Fixed a bug

git-svn-id: svn://svn.cc65.org/cc65/trunk@1862 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
cuz 2002-12-29 21:23:28 +00:00
parent e525cd2515
commit ed2bb59bcb

View File

@ -1625,13 +1625,21 @@ int hie10 (ExprDesc* lval)
lval->Flags = E_MEXPR;
lval->ConstVal = 0; /* Offset is zero now */
}
t = lval->Type;
if (IsClassPtr (t)) {
lval->Type = Indirect (t);
/* If the expression is already a pointer to function, the
* additional dereferencing operator must be ignored.
*/
if (IsTypeFuncPtr (lval->Type)) {
/* Expression not storable */
return 0;
} else {
if (IsClassPtr (lval->Type)) {
lval->Type = Indirect (lval->Type);
} else {
Error ("Illegal indirection");
}
return 1;
}
break;
case TOK_AND:
NextToken ();