mirror of
https://git.code.sf.net/p/libpng/code.git
synced 2025-07-10 18:04:09 +02:00
[libpng16] Fixed the simplified API example programs and improved the error
message if the version field is not set.
This commit is contained in:
committed by
Glenn Randers-Pehrson
parent
fd043e5d0d
commit
ed3ca0e3eb
@@ -2248,6 +2248,10 @@ png_image_write_to_stdio(png_imagep image, FILE *file, int convert_to_8bit,
|
||||
"png_image_write_to_stdio: invalid argument");
|
||||
}
|
||||
|
||||
else if (image != NULL)
|
||||
return png_image_error(image,
|
||||
"png_image_write_to_stdio: incorrect PNG_IMAGE_VERSION");
|
||||
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
@@ -2311,6 +2315,10 @@ png_image_write_to_file(png_imagep image, const char *file_name,
|
||||
"png_image_write_to_file: invalid argument");
|
||||
}
|
||||
|
||||
else if (image != NULL)
|
||||
return png_image_error(image,
|
||||
"png_image_write_to_file: incorrect PNG_IMAGE_VERSION");
|
||||
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user