From 85010e53582cb2d14fc81c33c9eb7f89224175ac Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Mon, 1 Feb 2016 12:27:13 +0100 Subject: [PATCH] seems like there is a problem opening files with the optional 'b' mode, so remove it everywhere? --- src/bind_storage.c | 2 +- src/kernel/group.test.c | 4 ++-- src/kernel/save.c | 6 +++--- src/kernel/save.test.c | 2 +- storage | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/bind_storage.c b/src/bind_storage.c index ca83f199a..aaeb84128 100644 --- a/src/bind_storage.c +++ b/src/bind_storage.c @@ -32,7 +32,7 @@ without prior permission by the authors of Eressea. static int tolua_storage_create(lua_State * L) { const char *filename = tolua_tostring(L, 1, 0); - const char *type = tolua_tostring(L, 2, "rb"); + const char *type = tolua_tostring(L, 2, "r"); gamedata *data; data = gamedata_open(filename, type); diff --git a/src/kernel/group.test.c b/src/kernel/group.test.c index 46d794d2d..35b25aad5 100644 --- a/src/kernel/group.test.c +++ b/src/kernel/group.test.c @@ -23,7 +23,7 @@ static void test_group_readwrite(CuTest * tc) FILE *F; stream strm; - F = fopen("test.dat", "wb"); + F = fopen("test.dat", "w"); fstream_init(&strm, F); binstore_init(&store, &strm); test_cleanup(); @@ -36,7 +36,7 @@ static void test_group_readwrite(CuTest * tc) binstore_done(&store); fstream_done(&strm); - F = fopen("test.dat", "rb"); + F = fopen("test.dat", "r"); fstream_init(&strm, F); binstore_init(&store, &strm); f->groups = 0; diff --git a/src/kernel/save.c b/src/kernel/save.c index a4227b9ac..25ae2d858 100644 --- a/src/kernel/save.c +++ b/src/kernel/save.c @@ -256,7 +256,7 @@ int readorders(const char *filename) int nfactions = 0; struct faction *f = NULL; - F = fopen(filename, "rb"); + F = fopen(filename, "r"); if (!F) { perror(filename); return -1; @@ -1407,7 +1407,7 @@ int readgame(const char *filename, bool backup) create_backup(path); } - F = fopen(path, "rb"); + F = fopen(path, "r"); if (!F) { perror(path); return -1; @@ -1753,7 +1753,7 @@ int writegame(const char *filename) /* make sure we don't overwrite an existing file (hard links) */ unlink(path); #endif - F = fopen(path, "wb"); + F = fopen(path, "w"); if (!F) { perror(path); return -1; diff --git a/src/kernel/save.test.c b/src/kernel/save.test.c index 9e9ba9107..e7f85ad7e 100644 --- a/src/kernel/save.test.c +++ b/src/kernel/save.test.c @@ -50,7 +50,7 @@ static void test_readwrite_unit(CuTest * tc) free_gamedata(); f = test_create_faction(0); renumber_faction(f, fno); - data = gamedata_open(path, "rb"); + data = gamedata_open(path, "r"); u = read_unit(data); gamedata_close(data); diff --git a/storage b/storage index 89f3c1b01..18cc3bb8f 160000 --- a/storage +++ b/storage @@ -1 +1 @@ -Subproject commit 89f3c1b01e41f2675fcbfd51fd8494894dc22d44 +Subproject commit 18cc3bb8f8906237915eb31c9899f95340318087