- added a proper error message when '--' or '++' gets used on 8 or 16 bit values.
This commit is contained in:
parent
f4143f7624
commit
a94f5dd1b3
2 changed files with 5 additions and 5 deletions
|
|
@ -2145,9 +2145,9 @@ FxExpression *FxPreIncrDecr::Resolve(FCompileContext &ctx)
|
|||
|
||||
ValueType = Base->ValueType;
|
||||
|
||||
if (!Base->IsNumeric())
|
||||
if (!Base->IsNumeric() || Base->ValueType->Size != 4)
|
||||
{
|
||||
ScriptPosition.Message(MSG_ERROR, "Numeric type expected");
|
||||
ScriptPosition.Message(MSG_ERROR, "Numeric 32 bit type expected");
|
||||
delete this;
|
||||
return nullptr;
|
||||
}
|
||||
|
|
@ -2232,9 +2232,9 @@ FxExpression *FxPostIncrDecr::Resolve(FCompileContext &ctx)
|
|||
|
||||
ValueType = Base->ValueType;
|
||||
|
||||
if (!Base->IsNumeric())
|
||||
if (!Base->IsNumeric() || ValueType->Size != 4)
|
||||
{
|
||||
ScriptPosition.Message(MSG_ERROR, "Numeric type expected");
|
||||
ScriptPosition.Message(MSG_ERROR, "Numeric 32 bit type expected");
|
||||
delete this;
|
||||
return nullptr;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue