diff options
author | Hop311 <Hop3114@gmail.com> | 2023-08-13 12:23:16 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-13 12:23:16 +0200 |
commit | 383ef70bea656a77e8b7c6843fd4a79705ecde49 (patch) | |
tree | 9cadf9090e944243f1d06b06a787a82555113168 /src/openvic | |
parent | d3c6ff1809b88b4c99163402f30b6d10c787510f (diff) | |
parent | a6a5cf677e7432d6110b45f0e94c42e662961dec (diff) |
Merge pull request #12 from OpenVicProject/whoops
fixed silly mistake
Diffstat (limited to 'src/openvic')
-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); } |