json_load_file: Open the input file in rb mode

For maximum compatibility.
This commit is contained in:
Petri Lehtinen 2011-10-04 21:11:26 +03:00
parent 84f739036d
commit 6362032513

View File

@ -947,7 +947,7 @@ json_t *json_load_file(const char *path, size_t flags, json_error_t *error)
jsonp_error_init(error, path); jsonp_error_init(error, path);
fp = fopen(path, "r"); fp = fopen(path, "rb");
if(!fp) if(!fp)
{ {
error_set(error, NULL, "unable to open %s: %s", error_set(error, NULL, "unable to open %s: %s",