- fixed: FFont::GetChar was unable to handle 8 bit signed chars.

SVN r3556 (trunk)
This commit is contained in:
Christoph Oelckers 2012-04-12 17:33:55 +00:00
parent 52bb3a4dbe
commit 1529c91b80

View file

@ -739,6 +739,11 @@ FRemapTable *FFont::GetColorTranslation (EColorRange range) const
int FFont::GetCharCode(int code, bool needpic) const
{
if (code < 0 && code >= -128)
{
// regular chars turn negative when the 8th bit is set.
code &= 255;
}
if (code >= FirstChar && code <= LastChar && (!needpic || Chars[code - FirstChar].Pic != NULL))
{
return code;