psforever / PSPack

A tool to work with PlanetSide 1's pack file format.
Other
3 stars 3 forks source link

Empty files cause a fatal error #4

Closed shaql2 closed 8 years ago

shaql2 commented 8 years ago
  if(compressedSize < adj) {
    fatal("compressed size too small");
  }

This stops the decompression if an empty file is encountered.

An example of an empty file can be found in the latest map_resource.pak, file groundcover_map49.lst

Adding if (e->compressedSize > 0) before the line carve_lzo_to_file(pFile, outName, e->compressedSize); fixes the issue