X-Git-Url: https://ruin.nu/git/?p=hbs.git;a=blobdiff_plain;f=bs%2Ffleet.cpp;h=00fb66b7e7005e1d590644d139f6624d4804c63d;hp=7361fe2122b486a4b32b11f7d69e44a3d27a857e;hb=b6d8203669c6a6016458e72fd240527845449475;hpb=33b6dc7ca95a05c26a78879413395c1588066b77 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;