diff --git a/exhal.c b/exhal.c index 882428c..5072b5b 100644 --- a/exhal.c +++ b/exhal.c @@ -48,7 +48,7 @@ int main (int argc, char **argv) { outputsize = unpack_from_file(infile, fileoffset, unpacked); // write the uncompressed data to the file - fseek(infile, 0, SEEK_SET); + fseek(outfile, 0, SEEK_SET); fwrite((const void*)unpacked, 1, outputsize, outfile); printf("\nUncompressed size: %d bytes\n", outputsize);