From facadda6e8ed70766162571f5e3967718fe951e9 Mon Sep 17 00:00:00 2001 From: Flugente Date: Fri, 17 Jun 2016 18:28:50 +0000 Subject: [PATCH] Fix: potential random memory access git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8252 3b4a5df2-a311-0410-b5c6-a8a6f20db521 --- Tactical/Soldier Control.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Tactical/Soldier Control.cpp b/Tactical/Soldier Control.cpp index 62f0b8ae..b1988f46 100644 --- a/Tactical/Soldier Control.cpp +++ b/Tactical/Soldier Control.cpp @@ -15229,7 +15229,7 @@ BOOLEAN SOLDIERTYPE::LooksLikeASoldier( void ) INT8 SOLDIERTYPE::GetUniformType( ) { // we determine wether we are currently wearing civilian or military clothes - for ( UINT8 i = UNIFORM_ENEMY_ADMIN; i <= NUM_UNIFORMS; ++i ) + for ( UINT8 i = UNIFORM_ENEMY_ADMIN; i < NUM_UNIFORMS; ++i ) { // both parts have to fit. We cant mix different uniforms and get soldier disguise if ( COMPARE_PALETTEREP_ID( this->VestPal, gUniformColors[i].vest ) && COMPARE_PALETTEREP_ID( this->PantsPal, gUniformColors[i].pants ) )