Commit 36c4f202 authored by tourettes's avatar tourettes Committed by npzacs

Use binary flag for file_open()

This is required to avoid Windows C runtime doing any charset conversions for binary files
parent 17c22857
......@@ -121,7 +121,7 @@ BD_FILE_H *disc_open_path(BD_DISC *p, const char *rel_path)
char *path;
path = str_printf("%s%s", p->disc_root, rel_path);
fp = file_open(path, "r");
fp = file_open(path, "rb");
if (!fp) {
BD_DEBUG(DBG_FILE | DBG_CRIT, "error opening file %s\n", path);
......@@ -138,7 +138,7 @@ BD_FILE_H *disc_open_file(BD_DISC *p, const char *dir, const char *file)
char *path;
path = str_printf("%s%s%c%s", p->disc_root, dir, DIR_SEP_CHAR, file);
fp = file_open(path, "r");
fp = file_open(path, "rb");
if (!fp) {
BD_DEBUG(DBG_FILE | DBG_CRIT, "error opening file %s\n", path);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment