From: Michael Andreen Date: Sat, 6 Apr 2002 15:47:38 +0000 (+0000) Subject: fixed an evil vector bug.. X-Git-Tag: HBS_0_1_0~27 X-Git-Url: https://ruin.nu/git/?p=hbs.git;a=commitdiff_plain;h=b6d8203669c6a6016458e72fd240527845449475 fixed an evil vector bug.. --- 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;