From a6a5cf677e7432d6110b45f0e94c42e662961dec Mon Sep 17 00:00:00 2001 From: Hop311 Date: Sun, 13 Aug 2023 11:10:34 +0100 Subject: fixed silly mistake --- src/openvic/map/Map.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/openvic/map/Map.cpp') diff --git a/src/openvic/map/Map.cpp b/src/openvic/map/Map.cpp index e8599b1..44c393d 100644 --- a/src/openvic/map/Map.cpp +++ b/src/openvic/map/Map.cpp @@ -170,7 +170,7 @@ index_t Map::get_province_index_at(size_t x, size_t y) const { } void Map::set_selected_province(index_t index) { - if (index < get_province_count()) { + if (index > get_province_count()) { Logger::error("Trying to set selected province to an invalid index ", index, " (max index is ", get_province_count(), ")"); selected_province = NULL_INDEX; } else { @@ -186,7 +186,6 @@ Province const* Map::get_selected_province() const { return get_province_by_index(get_selected_province_index()); } - Region* Map::get_region_by_identifier(const std::string_view identifier) { return regions.get_item_by_identifier(identifier); } -- cgit v1.2.3-56-ga3b1