[libpng15] Allow row_stride==0 to indicate default stride in simplified API

This commit is contained in:
John Bowler
2011-11-21 10:28:06 -06:00
committed by Glenn Randers-Pehrson
parent 925a60278e
commit 3706d730d1
5 changed files with 24 additions and 8 deletions

View File

@@ -2423,6 +2423,9 @@ png_image_finish_read(png_imagep image, png_colorp background, void *buffer,
{
png_uint_32 check;
if (row_stride == 0)
row_stride = PNG_IMAGE_ROW_STRIDE(*image);
if (row_stride < 0)
check = -row_stride;