aboutsummaryrefslogtreecommitdiffstats
path: root/src/png.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/png.c')
-rw-r--r--src/png.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/png.c b/src/png.c
index ad889e1..504cdf0 100644
--- a/src/png.c
+++ b/src/png.c
@@ -71,6 +71,7 @@ save_png (int fbfd, long width, long height, int imgfd, void *restrict data)
goto fail;
/* Initialise PNG write, and write head. */
+ errno = 0;
if (setjmp (png_jmpbuf(pngbuf))) /* Failing libpng calls jump here. */
goto fail;
png_init_io (pngbuf, file);