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)
if(compressed_data)
{
memset(compressed_data, 0, in_size);
fread(compressed_data, 1, in_size, fp_in);
decompressed_data = (char *) tinfl_decompress_mem_to_heap(compressed_data, in_size, &out_size, 0);
if(decompressed_data)
if(fread(compressed_data, 1, in_size, fp_in) == in_size)
{
fwrite(decompressed_data, 1, out_size, fp_out);
free(decompressed_data);
retval = out_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);
free(decompressed_data);
retval = out_size;
}
}
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