From 8bbc04a46f293af2ed891b1798a3b479f9d4f402 Mon Sep 17 00:00:00 2001 From: Jordon Moss Date: Fri, 15 Jul 2016 23:54:32 -0300 Subject: [PATCH] Fixed a minor typo in SurfaceSkin validity check. --- src/gl/models/gl_models.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gl/models/gl_models.cpp b/src/gl/models/gl_models.cpp index 3c2eb05c8..0b7870833 100644 --- a/src/gl/models/gl_models.cpp +++ b/src/gl/models/gl_models.cpp @@ -708,7 +708,7 @@ void gl_InitModels() sc.ScriptError("Too many models in %s", smf.type->TypeName.GetChars()); } - if (surface<0 || index >= MD3_MAX_SURFACES) + if (surface<0 || surface >= MD3_MAX_SURFACES) { sc.ScriptError("Invalid MD3 Surface %d in %s", MD3_MAX_SURFACES, smf.type->TypeName.GetChars()); }