From 1529c91b8048ad44948376743f07f7e8749ca40e Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Thu, 12 Apr 2012 17:33:55 +0000 Subject: [PATCH] - fixed: FFont::GetChar was unable to handle 8 bit signed chars. SVN r3556 (trunk) --- src/v_font.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/v_font.cpp b/src/v_font.cpp index 29f2b3632c..b7d5392cd8 100644 --- a/src/v_font.cpp +++ b/src/v_font.cpp @@ -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;