[Zlib-devel] zlib: Run-Time Check Failure #1 - A cast to smaller data type
Glenn Randers-Pehrson
glennrp at comcast.net
Mon Aug 27 08:09:35 EDT 2007
Received from "ale5000" on the libpng bug tracker:
Visual Studio say: Run-Time Check Failure #1 - A cast to smaller data type
has caused a loss of data. If this was intentional, you should mask the
source of the cast with the appropriate bitmask. For example: char c = (i &
0xFF); Changing the code in this way will not affect the quality of the
resulting optimized code.
It happens at:
File: trees.c
Line: 1087 -> send_code(s, lc, ltree); /* send a literal byte */
Stack:
> compress_block(internal_state * s=0x067ea4c0, ct_data_s *
ltree=0x009790c8, ct_data_s * dtree=0x00979548) Riga 1087 + 0x51 C
_tr_flush_block(internal_state * s=0x067ea4c0, char * buf=0x0753dc08,
unsigned long stored_len=15, int eof=0) Riga 989 + 0x13 C
deflate_slow(internal_state * s=0x067ea4c0, int flush=2) Riga 1672 +
0x4e C
deflate(z_stream_s * strm=0x074ac9b0, int flush=2) Riga 790 + 0x1c C
More information about the Zlib-devel
mailing list