fix signed/unsigned compare

develop
Myk Taylor 2023-02-22 23:19:04 -08:00
parent f0ca7ad425
commit d8e440806c
No known key found for this signature in database
1 changed files with 1 additions and 1 deletions

@ -47,7 +47,7 @@ DefaultItemFilters::DefaultItemFilters(color_ostream &out, PersistentDataItem &f
}
void DefaultItemFilters::setItemFilter(DFHack::color_ostream &out, const ItemFilter &filter, int index) {
if (item_filters.size() <= index) {
if (index < 0 || item_filters.size() <= (size_t)index) {
WARN(status,out).print("invalid index for filter key %d,%d,%d: %d\n",
std::get<0>(key), std::get<1>(key), std::get<2>(key), index);
return;