- fixed some remaining issues:

* initial positioning in a subsection of a file failed. This mainly affected music playback.
* made the FileRdr constructor which takes a FileReaderInterface private so that everything that needs it must be explicitly declared as friend.
* removed a few redundant construction initializers for FileRdrs.
* loading compressed nodes needs to check the validity of its reader.
* use GetLength to detemine the size of a Zip file instead of doing another seek to the end.
* removed duplicate Length variables.
This commit is contained in:
Christoph Oelckers 2018-03-11 13:26:30 +01:00
commit 8bbfd39f42
7 changed files with 42 additions and 39 deletions

View file

@ -124,9 +124,7 @@ static uint32_t Zip_FindCentralDir(FileRdr &fin)
uint32_t uMaxBack; // maximum size of global comment
uint32_t uPosFound=0;
fin.Seek(0, FileRdr::SeekEnd);
FileSize = (uint32_t)fin.Tell();
FileSize = (uint32_t)fin.GetLength();
uMaxBack = MIN<uint32_t>(0xffff, FileSize);
uBackRead = 4;