Commit 5c37bcc3 by heffnercj

Fixed compiler warning in tinfl.c

parent f6eea731
...@@ -625,15 +625,17 @@ int inflate_raw_file(char *in_file, char *out_file) ...@@ -625,15 +625,17 @@ int inflate_raw_file(char *in_file, char *out_file)
if(compressed_data) if(compressed_data)
{ {
memset(compressed_data, 0, in_size); memset(compressed_data, 0, in_size);
fread(compressed_data, 1, in_size, fp_in);
if(fread(compressed_data, 1, in_size, fp_in) == in_size)
decompressed_data = (char *) tinfl_decompress_mem_to_heap(compressed_data, in_size, &out_size, 0);
if(decompressed_data)
{ {
fwrite(decompressed_data, 1, out_size, fp_out); decompressed_data = (char *) tinfl_decompress_mem_to_heap(compressed_data, in_size, &out_size, 0);
free(decompressed_data);
retval = out_size; if(decompressed_data)
{
fwrite(decompressed_data, 1, out_size, fp_out);
free(decompressed_data);
retval = out_size;
}
} }
free(compressed_data); free(compressed_data);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment