mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-09-14 15:00:18 -04:00
fix index check + cast to size_t
This commit is contained in:
parent
4182279f72
commit
ea02c69186
@ -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]));
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user