fix bad decompression size error

This commit is contained in:
devinacker 2013-11-15 16:23:10 -05:00
parent 389613d56e
commit b1263f2c05
2 changed files with 2 additions and 2 deletions

View file

@ -274,7 +274,7 @@ size_t unpack_from_file (FILE *file, size_t offset, uint8_t *unpacked) {
fseek(file, offset, SEEK_SET);
fread((void*)packed, DATA_SIZE, 1, file);
if (!feof(file))
if (!ferror(file))
return unpack(packed, unpacked);
return 0;

View file

@ -52,7 +52,7 @@ int main (int argc, char **argv) {
} else {
fprintf(stderr, "Error: Unable to decompress %s because an invalid offset was specified\n"
" (must be between zero and 0x%X).\n", argv[1], ftell(infile));
outputsize = 0;
exit(-1);
}
if (outputsize) {