- fixed retrieval of constant for state index.

This commit is contained in:
Christoph Oelckers 2016-11-05 10:38:23 +01:00
parent 272dff6b8f
commit b890f2b608
1 changed files with 1 additions and 1 deletions

View File

@ -7886,7 +7886,7 @@ FxExpression *FxRuntimeStateIndex::Resolve(FCompileContext &ctx)
delete this;
return nullptr;
}
else if (Index->isConstant() && static_cast<FxConstant *>(Index)->GetValue() < 0)
else if (Index->isConstant() && static_cast<FxConstant *>(Index)->GetValue().GetInt() < 0)
{
ScriptPosition.Message(MSG_ERROR, "State index must be positive");
delete this;