From 3544f148c59453cb726336896e1b4a2fcaef4bfa Mon Sep 17 00:00:00 2001 From: SomaZ <17459161+SomaZ@users.noreply.github.com> Date: Sat, 30 Sep 2023 15:00:22 +0200 Subject: [PATCH] [MP] fix off-by-one in TruncateGLExtensionsString which affects mods not derived from OJK (#1175) see: https://github.com/JACoders/OpenJK/commit/26b871955051d6c4b12e583557b08153431df38e --- codemp/rd-rend2/tr_init.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/codemp/rd-rend2/tr_init.cpp b/codemp/rd-rend2/tr_init.cpp index 821742c669..490eda6664 100644 --- a/codemp/rd-rend2/tr_init.cpp +++ b/codemp/rd-rend2/tr_init.cpp @@ -429,7 +429,7 @@ static const char *TruncateGLExtensionsString (const char *extensionsString, int char *truncatedExtensions; - while ( (q = strchr (p, ' ')) != NULL && numExtensions <= maxExtensions ) + while ( (q = strchr (p, ' ')) != NULL && numExtensions < maxExtensions ) { p = q + 1; numExtensions++;