diff options
Diffstat (limited to 'pngtrans.c')
-rw-r--r-- | pngtrans.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/pngtrans.c b/pngtrans.c index fef12f185..ee60957fc 100644 --- a/pngtrans.c +++ b/pngtrans.c @@ -1,7 +1,7 @@ /* pngtrans.c - transforms the data in a row (used by both readers and writers) * - * Last changed in libpng 1.5.10 [March 8, 2012] + * Last changed in libpng 1.5.11 [June 14, 2012] * Copyright (c) 1998-2012 Glenn Randers-Pehrson * (Version 0.96 Copyright (c) 1996, 1997 Andreas Dilger) * (Version 0.88 Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.) @@ -626,7 +626,7 @@ void /* PRIVATE */ png_do_check_palette_indexes(png_structp png_ptr, png_row_infop row_info) { if (png_ptr->num_palette < (1 << row_info->bit_depth) && - png_ptr->num_palette_max >= 0) + png_ptr->num_palette > 0) /* num_palette can be 0 in MNG files */ { /* Calculations moved outside switch in an attempt to stop different * compiler warnings. 'padding' is in *bits* within the last byte, it is @@ -708,7 +708,7 @@ png_do_check_palette_indexes(png_structp png_ptr, png_row_infop row_info) { for (; rp > png_ptr->row_buf; rp--) { - if (*rp >= png_ptr->num_palette_max) + if (*rp > png_ptr->num_palette_max) png_ptr->num_palette_max = (int) *rp; } |