Movies: Fixed last emulation setting stored in movie file not being applied correctly

This commit is contained in:
Sour 2024-10-23 20:01:33 +09:00
parent 0f08c71c5a
commit f2e071d435
1 changed files with 2 additions and 2 deletions

View File

@ -178,7 +178,7 @@ bool Serializer::LoadFromTextFormat(istream& file)
}
i += (uint32_t)key.size() + 1;
if(i >= size - 4) {
if(i >= size) {
//invalid
return false;
}
@ -191,7 +191,7 @@ bool Serializer::LoadFromTextFormat(istream& file)
}
}
if(i + valueSize > size) {
if(i + valueSize > size || valueSize == 0) {
//invalid
return false;
}