Fix faulty frms

Closes #235
This commit is contained in:
Alexander Batalov 2023-02-16 15:46:49 +03:00
parent 42346f66b2
commit 0a9a1dc7ca

View File

@ -1076,6 +1076,11 @@ static int artReadHeader(Art* art, File* stream)
if (fileReadInt32List(stream, art->dataOffsets, ROTATION_COUNT) == -1) return -1;
if (fileReadInt32(stream, &(art->dataSize)) == -1) return -1;
// CE: Fix malformed `frm` files with `dataSize` set to 0 in Nevada.
if (art->dataSize == 0) {
art->dataSize = fileGetSize(stream);
}
return 0;
}