mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-19 23:23:52 +00:00
Compare positive int as std::size_t
If records.size() is greater than max int comparison is invalid.
This commit is contained in:
parent
1c08bc0b15
commit
bf2f15342b
1 changed files with 1 additions and 1 deletions
|
@ -315,7 +315,7 @@ void NIFFile::parse(Files::IStreamPtr stream)
|
||||||
for (std::size_t i = 0; i < rootNum; i++)
|
for (std::size_t i = 0; i < rootNum; i++)
|
||||||
{
|
{
|
||||||
int idx = nif.getInt();
|
int idx = nif.getInt();
|
||||||
if (idx >= 0 && idx < int(records.size()))
|
if (idx >= 0 && static_cast<std::size_t>(idx) < records.size())
|
||||||
{
|
{
|
||||||
roots[i] = records[idx];
|
roots[i] = records[idx];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue