From 699b04161ae6914eb9b4f9c600cdf0b51df2598a Mon Sep 17 00:00:00 2001 From: Pascal Massimino Date: Sun, 26 Feb 2017 14:05:42 -0800 Subject: [PATCH] ImgIoUtilWriteFile(): use ImgIoUtilSetBinaryMode this matches what's done in cwebp.c:977 Change-Id: I0a05d03c97a073b8aa1e01430f20d6cc3c5ffc91 --- imageio/imageio_util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/imageio/imageio_util.c b/imageio/imageio_util.c index eabab9dd..3ebd5b4e 100644 --- a/imageio/imageio_util.c +++ b/imageio/imageio_util.c @@ -112,7 +112,7 @@ int ImgIoUtilWriteFile(const char* const file_name, if (data == NULL) { return 0; } - out = to_stdout ? stdout : fopen(file_name, "wb"); + out = to_stdout ? ImgIoUtilSetBinaryMode(stdout) : fopen(file_name, "wb"); if (out == NULL) { fprintf(stderr, "Error! Cannot open output file '%s'\n", file_name); return 0;