Commits

David Stone committed 8423cb4

Added an assertion to Battles.

Comments (0)

Files changed (1)

source/clients/network/battles.cpp

 
 #include "battles.hpp"
 
+#include <cassert>
+
 #include "no_pending_challenges.hpp"
 
 #include "../battle.hpp"
 namespace network {
 
 void Battles::handle_challenge_withdrawn() {
-	if (challenges_are_queued())
+	if (challenges_are_queued()) {
+		assert(challenges.size() == 1);
 		challenges.erase(challenges.begin());
+	}
 }
 
 void Battles::handle_challenge_withdrawn (std::string const & opponent) {