From a15f245e5c8dbdf9cc7fa877ce14317aa1cf80d5 Mon Sep 17 00:00:00 2001 From: Michael McKoy <ferret99gt@gmail.com> Date: Wed, 3 Oct 2007 23:51:34 +0000 Subject: [PATCH] Crash loop in Mapchooser fixed. --HG-- extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/trunk%401535 --- plugins/mapchooser.sp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/mapchooser.sp b/plugins/mapchooser.sp index 37b52f3a..d230e7f5 100644 --- a/plugins/mapchooser.sp +++ b/plugins/mapchooser.sp @@ -504,12 +504,12 @@ CreateNextVote() for (new i = 0; i < limit; i++) { - new b = GetRandomInt(0, limit - 1); + new b = GetRandomInt(0, g_MapList - 1); GetArrayString(g_MapList, b, map, sizeof(map)); while (IsStringInArray(g_NextMapList, map) || (oldMaps && IsStringInArray(g_OldMapList, map))) { - b = GetRandomInt(0, limit - 1); + b = GetRandomInt(0, g_MapList - 1); GetArrayString(g_MapList, b, map, sizeof(map)); }