- fixed character to int conversion for UTF8-characters.

This commit is contained in:
Christoph Oelckers 2018-12-01 09:14:23 +01:00
parent 8d9b4f5a17
commit ea3d26aafd

View file

@ -327,7 +327,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;