mirror of
https://github.com/ZDoom/qzdoom-gpl.git
synced 2025-01-31 10:40:33 +00:00
- fixed: FFont::GetChar was unable to handle 8 bit signed chars.
SVN r3556 (trunk)
This commit is contained in:
parent
52bb3a4dbe
commit
1529c91b80
1 changed files with 5 additions and 0 deletions
|
@ -739,6 +739,11 @@ FRemapTable *FFont::GetColorTranslation (EColorRange range) const
|
||||||
|
|
||||||
int FFont::GetCharCode(int code, bool needpic) 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))
|
if (code >= FirstChar && code <= LastChar && (!needpic || Chars[code - FirstChar].Pic != NULL))
|
||||||
{
|
{
|
||||||
return code;
|
return code;
|
||||||
|
|
Loading…
Reference in a new issue