mirror of
https://github.com/webmproject/libwebp.git
synced 2024-12-26 13:48:21 +01:00
webpmux: (windows) open stdout in binary mode
prevents corrupt output. related to issue #217 Change-Id: I6f0dac8131127717ba72b0709fb35d421ab41acb
This commit is contained in:
parent
e9bfb1166d
commit
e80eab1fbc
@ -402,8 +402,9 @@ static int CreateMux(const char* const filename, WebPMux** mux) {
|
||||
|
||||
static int WriteData(const char* filename, const WebPData* const webpdata) {
|
||||
int ok = 0;
|
||||
FILE* fout = strcmp(filename, "-") ? fopen(filename, "wb") : stdout;
|
||||
if (!fout) {
|
||||
FILE* fout = strcmp(filename, "-") ? fopen(filename, "wb")
|
||||
: ExUtilSetBinaryMode(stdout);
|
||||
if (fout == NULL) {
|
||||
fprintf(stderr, "Error opening output WebP file %s!\n", filename);
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user