From eb6a8431af6147da7933d188bc94be3e850fb6d4 Mon Sep 17 00:00:00 2001 From: div0 Date: Sun, 20 Aug 2006 11:01:03 +0000 Subject: [PATCH] fixed out-of-range g_maplist_position causing runaway loop git-svn-id: svn://svn.icculus.org/nexuiz/trunk@1831 f962a42d-fe04-0410-a3ab-8c8b0445ebaa --- data/qcsrc/server/g_world.qc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/data/qcsrc/server/g_world.qc b/data/qcsrc/server/g_world.qc index c6f5e1cc5..461efa2bd 100644 --- a/data/qcsrc/server/g_world.qc +++ b/data/qcsrc/server/g_world.qc @@ -544,8 +544,8 @@ void() GotoNextMap = } temp = strzone(temp); dprint("g_maplist is ", temp, "\n"); - lCurrent = max(0, GetMaplistPosition()); lSize = tokenize( temp ); + lCurrent = bound(0, floor(GetMaplistPosition()), lSize - 1); lOldCurrent = lCurrent; dprint(ftos(lOldCurrent), " / ", ftos(lSize), " (start)\n"); -- 2.39.2