json_load_file: Open the input file in rb mode
For maximum compatibility.
This commit is contained in:
parent
84f739036d
commit
6362032513
@ -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",
|
||||||
|
Loading…
Reference in New Issue
Block a user