fix: issue #2

This commit is contained in:
Joseph Poirier 2015-06-13 12:07:39 -05:00
parent f44d7556be
commit e8b2139b26

View file

@ -654,7 +654,11 @@ void ExpressionPrefixOperator(struct ParseState *Parser,
ExpressionStackPushValueNode(Parser, StackTop, Result); ExpressionStackPushValueNode(Parser, StackTop, Result);
break; break;
case TokenAsterisk: case TokenAsterisk:
ExpressionStackPushDereference(Parser, StackTop, TopValue); if(StackTop != NULL && (*StackTop) != NULL && (*StackTop)->Op == TokenSizeof)
/* ignored */
ExpressionStackPushValueByType(Parser, StackTop, TopValue->Typ);
else
ExpressionStackPushDereference(Parser, StackTop, TopValue);
break; break;
case TokenSizeof: case TokenSizeof:
/* return the size of the argument */ /* return the size of the argument */