diff options
author | Takamichi Horikawa <takamichiho@gmail.com> | 2017-01-25 18:53:20 +0900 |
---|---|---|
committer | Takamichi Horikawa <takamichiho@gmail.com> | 2017-01-25 18:53:20 +0900 |
commit | 126f4858151487a2725c109f001c08ef8c59631e (patch) | |
tree | 5fa83fb82fb2390bb9f7aaa8cf7d82f3ece05745 /curses | |
parent | 1f8e53033ed15a3d460d53585b0803a4f55f6944 (diff) |
fopen in binary mode for windows
Diffstat (limited to 'curses')
-rw-r--r-- | curses/main.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/curses/main.c b/curses/main.c index 6f362fa..3309e48 100644 --- a/curses/main.c +++ b/curses/main.c @@ -323,7 +323,7 @@ static bool readrom(struct opna *opna) { path = dpath; } } - FILE *rhythm = fopen(path, "r"); + FILE *rhythm = fopen(path, "rb"); free(dpath); if (!rhythm) goto err; if (fseek(rhythm, 0, SEEK_END) != 0) goto err_file; @@ -353,9 +353,9 @@ static FILE *pvisearch(const char *filename, const char *pvibase) { *c += ('a' - 'A'); } } - FILE *pvifile = fopen(pviname, "r"); + FILE *pvifile = fopen(pviname, "rb"); if (pvifile) return pvifile; - pvifile = fopen(pviname_l, "r"); + pvifile = fopen(pviname_l, "rb"); if (pvifile) return pvifile; char *slash = strrchr(filename, '/'); if (!slash) return 0; @@ -364,14 +364,14 @@ static FILE *pvisearch(const char *filename, const char *pvibase) { memcpy(pvipath, filename, slash-filename+1); pvipath[slash-filename+1] = 0; strcat(pvipath, pviname); - pvifile = fopen(pvipath, "r"); + pvifile = fopen(pvipath, "rb"); if (pvifile) { free(pvipath); return pvifile; } pvipath[slash-filename+1] = 0; strcat(pvipath, pviname_l); - pvifile = fopen(pvipath, "r"); + pvifile = fopen(pvipath, "rb"); if (pvifile) { free(pvipath); return pvifile; |