diff --git a/src/address_parser.c b/src/address_parser.c index b8c935e4..7e6de097 100644 --- a/src/address_parser.c +++ b/src/address_parser.c @@ -228,7 +228,7 @@ bool address_parser_load(char *dir) { char_array_add_joined(path, PATH_SEPARATOR, true, 2, dir, ADDRESS_PARSER_PHRASE_FILENAME); char *phrases_path = char_array_get_string(path); - FILE *phrases_file = fopen(phrases_path, "r"); + FILE *phrases_file = fopen(phrases_path, "rb"); if (phrases_file == NULL) { goto exit_address_parser_created; } @@ -269,7 +269,7 @@ bool address_parser_load(char *dir) { char *postal_codes_path = char_array_get_string(path); - FILE *postal_codes_file = fopen(postal_codes_path, "r"); + FILE *postal_codes_file = fopen(postal_codes_path, "rb"); if (postal_codes_file == NULL) { goto exit_address_parser_created; } diff --git a/src/trie.c b/src/trie.c index 35b4254c..2e11ba6e 100644 --- a/src/trie.c +++ b/src/trie.c @@ -1110,7 +1110,7 @@ exit_file_read: trie_t *trie_load(char *path) { FILE *file; - file = fopen(path, "r"); + file = fopen(path, "rb"); if (!file) return NULL;