r1831 - trunk/data/qcsrc/server

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Sun Aug 20 07:01:03 EDT 2006


Author: div0
Date: 2006-08-20 07:01:03 -0400 (Sun, 20 Aug 2006)
New Revision: 1831

Modified:
   trunk/data/qcsrc/server/g_world.qc
Log:
fixed out-of-range g_maplist_position causing runaway loop


Modified: trunk/data/qcsrc/server/g_world.qc
===================================================================
--- trunk/data/qcsrc/server/g_world.qc	2006-08-20 11:00:32 UTC (rev 1830)
+++ trunk/data/qcsrc/server/g_world.qc	2006-08-20 11:01:03 UTC (rev 1831)
@@ -544,8 +544,8 @@
 			}
 			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");
 




More information about the nexuiz-commits mailing list