From b6d8203669c6a6016458e72fd240527845449475 Mon Sep 17 00:00:00 2001 From: Michael Andreen Date: Sat, 6 Apr 2002 15:47:38 +0000 Subject: [PATCH] fixed an evil vector bug.. --- bs/fleet.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bs/fleet.cpp b/bs/fleet.cpp index 7361fe2..00fb66b 100644 --- a/bs/fleet.cpp +++ b/bs/fleet.cpp @@ -82,7 +82,8 @@ int Fleet::numberOfShips() const for (map >::const_iterator i = m_Fleet.begin(); i != m_Fleet.end(); ++i) { - total += i->second[0]; + if (i->second.size() != 0) + total += i->second[0]; } return total; -- 2.39.2