mirror of
https://git.code.sf.net/p/libpng/code.git
synced 2025-07-10 18:04:09 +02:00
png_app_warning fix
The implementations of png_app_error and png_app_warning were swapped. The non-release behavior of using PNG_ERROR on both doesn't work in practice because there are some cases where the warnings are very mild (specifically the one about writing an iCCP chunk when sRGB could be used.) png_app_warning now does PNG_WARN by default in all cases. Signed-off-by: John Bowler <jbowler@acm.org>
This commit is contained in:
@@ -353,13 +353,13 @@ app_error(png_const_structrp png_ptr, png_const_charp error_message,
|
||||
void /* PRIVATE */
|
||||
png_app_warning(png_const_structrp png_ptr, png_const_charp error_message)
|
||||
{
|
||||
app_error(png_ptr, error_message, png_ptr->app_error_action);
|
||||
app_error(png_ptr, error_message, png_ptr->app_warning_action);
|
||||
}
|
||||
|
||||
void /* PRIVATE */
|
||||
png_app_error(png_const_structrp png_ptr, png_const_charp error_message)
|
||||
{
|
||||
app_error(png_ptr, error_message, png_ptr->app_warning_action);
|
||||
app_error(png_ptr, error_message, png_ptr->app_error_action);
|
||||
}
|
||||
#endif /* BENIGN_ERRORS */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user