]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Potentially fix a crash
authorMario <mario@smbclan.net>
Tue, 29 Dec 2015 09:51:49 +0000 (19:51 +1000)
committerMario <mario@smbclan.net>
Tue, 29 Dec 2015 09:52:12 +0000 (19:52 +1000)
qcsrc/server/mapvoting.qc

index a08272010eee694c4bc0fe3983145af5b5c76fdf..f59866b29b12bd3c066e28a1b6b5eea5984e38e4 100644 (file)
@@ -482,13 +482,13 @@ float MapVote_Finished(float mappos)
 
 void MapVote_CheckRules_1()
 {
-       float i;
+       int j;
 
-       for(i = 0; i < mapvote_count; ++i)
-               if( mapvote_maps_flags[i] & GTV_AVAILABLE )
+       for(j = 0; i < mapvote_count; ++j)
+               if( mapvote_maps_flags[j] & GTV_AVAILABLE )
                {
-                       //dprint("Map ", ftos(i), ": "); dprint(mapvote_maps[i], "\n");
-                       mapvote_selections[i] = 0;
+                       //dprint("Map ", ftos(j), ": "); dprint(mapvote_maps[j], "\n");
+                       mapvote_selections[j] = 0;
                }
 
        mapvote_voters = 0;
@@ -496,9 +496,9 @@ void MapVote_CheckRules_1()
                ++mapvote_voters;
                if(it.mapvote)
                {
-                       i = it.mapvote - 1;
+                       j = it.mapvote - 1;
                        //dprint("Player ", it.netname, " vote = ", ftos(it.mapvote - 1), "\n");
-                       mapvote_selections[i] = mapvote_selections[i] + 1;
+                       mapvote_selections[j] = mapvote_selections[j] + 1;
                }
        ));
 }