Fix ftell() error sentinel value being used in allocation

This commit is contained in:
Jonathan G Rennison
2021-04-08 17:45:13 +01:00
parent 6490b252f5
commit 191e4266f4

View File

@@ -209,7 +209,7 @@ void IniLoadFile::LoadFromDisk(const std::string &filename, Subdirectory subdir,
if (save != nullptr) {
save->clear();
save->reserve(end);
if (end < (1 << 20)) save->reserve(end);
}
end += ftell(in);