- fixed character to int conversion for UTF8-characters.

This commit is contained in:
Christoph Oelckers 2018-12-01 09:14:23 +01:00 committed by drfrag
parent e9daf31b23
commit 798cebf891

View file

@ -335,7 +335,7 @@ static FxExpression *StringConstToChar(FxExpression *basex)
int c = utf8_decode(str.GetChars(), &size);
if (c >= 0 && size_t(size) == str.Len())
{
return new FxConstant(str[0], basex->ScriptPosition);
return new FxConstant(c, basex->ScriptPosition);
}
}
return nullptr;