From 32cd82127390b9fd5b5d090bc3c279d3e4d9f3a6 Mon Sep 17 00:00:00 2001 From: Petri Lehtinen Date: Fri, 7 Oct 2011 20:52:49 +0300 Subject: [PATCH] json_dump_file: Open the output file in wb mode For maximum compatibility. --- src/dump.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dump.c b/src/dump.c index d87d5c7..33112ba 100644 --- a/src/dump.c +++ b/src/dump.c @@ -425,7 +425,7 @@ int json_dump_file(const json_t *json, const char *path, size_t flags) { int result; - FILE *output = fopen(path, "w"); + FILE *output = fopen(path, "wb"); if(!output) return -1; -- 2.7.4