From 39d4fe5fb797865288ba506ffc03eb90d00446e9 Mon Sep 17 00:00:00 2001 From: hikerstk Date: Mon, 20 Dec 2010 02:41:02 +0000 Subject: [PATCH] Fixed incorrect rescue positions in battle mode, which could result in a crash (bug #3140030). git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@7102 178a84e3-b1eb-0310-8ba1-8eac791a3b58 --- src/modes/three_strikes_battle.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modes/three_strikes_battle.cpp b/src/modes/three_strikes_battle.cpp index fa3fe3769..106bf3e5d 100644 --- a/src/modes/three_strikes_battle.cpp +++ b/src/modes/three_strikes_battle.cpp @@ -293,7 +293,7 @@ void ThreeStrikesBattle::moveKartAfterRescue(Kart* kart) fabs(kart_z - v.getZ()); if(dist_n < smallest_distance_found || closest_id_found == -1) { - closest_id_found = n+1; + closest_id_found = n; smallest_distance_found = dist_n; } }