Fix configGetIntList

This commit is contained in:
Alexander Batalov 2022-12-28 09:14:30 +03:00
parent 0e11569397
commit b6ee5fcbe9
1 changed files with 5 additions and 3 deletions

View File

@ -248,12 +248,14 @@ bool configGetIntList(Config* config, const char* sectionKey, const char* key, i
string = pch + 1;
}
if (count <= 1) {
// SFALL: Fix getting last item in a list if the list has less than the
// requested number of values (for `chem_primary_desire`).
if (count > 0) {
*arr = atoi(string);
return true;
count--;
}
return false;
return count == 0;
}
// 0x42C160