1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-06-28 03:11:34 +00:00

fix index check + cast to size_t

This commit is contained in:
Sebastian Fieber 2025-01-06 21:47:09 +01:00
parent 4182279f72
commit ea02c69186

View file

@ -106,7 +106,7 @@ namespace MWLua
return values;
const std::vector<std::string>& contentList = MWBase::Environment::get().getWorld()->getContentFiles();
if (textureId.second > 0 && textureId.second < contentList.size())
if (textureId.second >= 0 && static_cast<size_t>(textureId.second) < contentList.size())
values.push_back(sol::make_object<std::string>(lua, contentList[textureId.second]));
}