check return value from zlib inflateInit2...

This commit is contained in:
iceman1001 2019-04-08 08:08:47 +02:00
commit a89ae9cb35
3 changed files with 10 additions and 4 deletions

View file

@ -229,8 +229,10 @@ static bool reset_fpga_stream(int bitstream_version, z_streamp compressed_fpga_s
compressed_fpga_stream->zalloc = &fpga_inflate_malloc;
compressed_fpga_stream->zfree = &fpga_inflate_free;
inflateInit2(compressed_fpga_stream, 0);
int res = inflateInit2(compressed_fpga_stream, 0);
if ( res < 0 )
return false;
fpga_image_ptr = output_buffer;
for (uint16_t i = 0; i < FPGA_BITSTREAM_FIXED_HEADER_SIZE; i++)