mirror of
https://git.code.sf.net/p/libpng/code.git
synced 2025-07-10 18:04:09 +02:00
[libpng17] Changed "if (!x)" to "if (x == 0)" and "if (x)" to "if (x !== 0)"
This commit is contained in:
@@ -2632,10 +2632,10 @@ png_handle_iTXt(png_structrp png_ptr, png_inforp info_ptr, png_uint_32 length)
|
||||
*/
|
||||
++prefix_length;
|
||||
|
||||
if (!compressed && prefix_length <= length)
|
||||
if (compressed == 0 && prefix_length <= length)
|
||||
uncompressed_length = length - prefix_length;
|
||||
|
||||
else if (compressed && prefix_length < length)
|
||||
else if (compressed != 0 && prefix_length < length)
|
||||
{
|
||||
uncompressed_length = PNG_SIZE_MAX;
|
||||
|
||||
@@ -2928,7 +2928,7 @@ png_handle_unknown(png_structrp png_ptr, png_inforp info_ptr,
|
||||
#endif /* !PNG_READ_UNKNOWN_CHUNKS_SUPPORTED */
|
||||
|
||||
/* Check for unhandled critical chunks */
|
||||
if (!handled && PNG_CHUNK_CRITICAL(png_ptr->chunk_name))
|
||||
if (handled == 0 && PNG_CHUNK_CRITICAL(png_ptr->chunk_name))
|
||||
png_chunk_error(png_ptr, "unhandled critical chunk");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user