fix bad decompression size error
This commit is contained in:
parent
389613d56e
commit
b1263f2c05
2 changed files with 2 additions and 2 deletions
|
@ -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;
|
||||
|
|
2
exhal.c
2
exhal.c
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue