forked from github/server
seems like there is a problem opening files with the optional 'b' mode, so remove it everywhere?
This commit is contained in:
parent
2f2bbb16ab
commit
85010e5358
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
2
storage
2
storage
|
@ -1 +1 @@
|
|||
Subproject commit 89f3c1b01e41f2675fcbfd51fd8494894dc22d44
|
||||
Subproject commit 18cc3bb8f8906237915eb31c9899f95340318087
|
Loading…
Reference in New Issue