commit 89e0b83d37591dba2cec62c13565caf96da64073
Author: Johan Mattsson <39247600+mjunix@users.noreply.github.com>
AuthorDate: Sat Apr 1 10:42:28 2023 +0200
Commit: GitHub <noreply@github.com>
CommitDate: Sat Apr 1 10:42:28 2023 +0200
Fix potential index out of bounds
---
src/doom/f_finale.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/doom/f_finale.c b/src/doom/f_finale.c
index 3fed0ea9..0acd6e39 100644
--- a/src/doom/f_finale.c
+++ b/src/doom/f_finale.c
@@ -277,7 +277,7 @@ void F_TextWrite (void)
}
c = toupper(c) - HU_FONTSTART;
- if (c < 0 || c> HU_FONTSIZE)
+ if (c < 0 || c >= HU_FONTSIZE)
{
cx += 4;
continue;
@@ -501,7 +501,7 @@ void F_CastPrint (const char *text)
if (!c)
break;
c = toupper(c) - HU_FONTSTART;
- if (c < 0 || c> HU_FONTSIZE)
+ if (c < 0 || c >= HU_FONTSIZE)
{
width += 4;
continue;
@@ -520,7 +520,7 @@ void F_CastPrint (const char *text)
if (!c)
break;
c = toupper(c) - HU_FONTSTART;
- if (c < 0 || c> HU_FONTSIZE)
+ if (c < 0 || c >= HU_FONTSIZE)
{
cx += 4;
continue;