diff options
author | Hop311 <hop3114@gmail.com> | 2023-08-13 12:10:34 +0200 |
---|---|---|
committer | Hop311 <hop3114@gmail.com> | 2023-08-13 12:10:34 +0200 |
commit | a6a5cf677e7432d6110b45f0e94c42e662961dec (patch) | |
tree | 9cadf9090e944243f1d06b06a787a82555113168 /src | |
parent | d3c6ff1809b88b4c99163402f30b6d10c787510f (diff) |
fixed silly mistake
Diffstat (limited to 'src')
-rw-r--r-- | src/openvic/map/Map.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
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); } |