The last sector of a file may be uncompressed if the sector length is less than or equal to the the number of bytes remaining. I've added an s2ma file to the test folder that demonstrates this issue.
Their logic is a little convoluted, but they cut down the expected sector size if the last sector isn't big enough. This causes the compression check down on L159 to fail.
The last sector of a file may be uncompressed if the sector length is less than or equal to the the number of bytes remaining. I've added an s2ma file to the test folder that demonstrates this issue.
See: https://github.com/stormlib/StormLib/blob/master/src/SFileReadFile.cpp#L109
Their logic is a little convoluted, but they cut down the expected sector size if the last sector isn't big enough. This causes the compression check down on L159 to fail.