fixed crash when loading an empty map

This commit is contained in:
Dave White 2004-06-21 13:13:48 +00:00
parent feeffbba6b
commit 8061d704d5

View File

@ -287,7 +287,7 @@ std::string gamemap::write() const
}
int gamemap::x() const { return tiles_.size(); }
int gamemap::y() const { return tiles_[0].size(); }
int gamemap::y() const { return tiles_.empty() ? 0 : tiles_.front().size(); }
const std::vector<gamemap::TERRAIN>& gamemap::operator[](int index) const
{