Fix potential negative array index in V_ThinStringWidth

This commit is contained in:
indev committed 2024-04-11 18:55:55 +03:00
1 parent aac74cf93a
commit af265d017d
1 file changed
+3
+3
View File
@@ -2944,6 +2944,9 @@ INT32 V_ThinStringWidth(const char *string, INT32 option)
if ((UINT8)c >= 0x80 && (UINT8)c <= 0x8F) //color parsing! -Inuyasha 2.16.09
continue;
if (c < HU_FONTSTART)
continue;
if (!lowercase || !tny_font[c-HU_FONTSTART])
c = toupper(c);
c -= HU_FONTSTART;