ImgIoUtilWriteFile(): use ImgIoUtilSetBinaryMode

this matches what's done in cwebp.c:977

Change-Id: I0a05d03c97a073b8aa1e01430f20d6cc3c5ffc91
This commit is contained in:
Pascal Massimino 2017-02-26 14:05:42 -08:00
parent 7d985bd1d0
commit 699b04161a

View File

@ -112,7 +112,7 @@ int ImgIoUtilWriteFile(const char* const file_name,
if (data == NULL) { if (data == NULL) {
return 0; return 0;
} }
out = to_stdout ? stdout : fopen(file_name, "wb"); out = to_stdout ? ImgIoUtilSetBinaryMode(stdout) : fopen(file_name, "wb");
if (out == NULL) { if (out == NULL) {
fprintf(stderr, "Error! Cannot open output file '%s'\n", file_name); fprintf(stderr, "Error! Cannot open output file '%s'\n", file_name);
return 0; return 0;