From 6a9b76a0c2b7f0febb2ceadecd8348583371f52f Mon Sep 17 00:00:00 2001 From: jenzur Date: Wed, 15 Apr 2020 01:00:12 +0200 Subject: [PATCH] array index issue supposedly --- RaceTimer/scripting/unloze_racetimer_redux.sp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/RaceTimer/scripting/unloze_racetimer_redux.sp b/RaceTimer/scripting/unloze_racetimer_redux.sp index f87a208c..1d9afe72 100644 --- a/RaceTimer/scripting/unloze_racetimer_redux.sp +++ b/RaceTimer/scripting/unloze_racetimer_redux.sp @@ -402,6 +402,8 @@ public int RetrieveZoneIndex(char[] zone) { //if you leave zone_2 you want the corresponding racezone to be zone_3 int iterator = strlen(zone) - 1; + if (iterator == -1) + return 1; char l_sZone[g_dIndex]; Format(l_sZone, sizeof(l_sZone), zone); while (IsCharNumeric(l_sZone[iterator]))