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:
parent
4182279f72
commit
ea02c69186
1 changed files with 1 additions and 1 deletions
|
@ -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…
Reference in a new issue