diff --git a/src/common/kernel/save.c b/src/common/kernel/save.c index db8143b51..c202db593 100644 --- a/src/common/kernel/save.c +++ b/src/common/kernel/save.c @@ -1612,7 +1612,7 @@ readgame(const char * filename, int mode, int backup) int id = store->r_int(store); plane *pl = getplanebyid(id); if (pl==NULL) { - calloc(1, sizeof(plane)); + pl = calloc(1, sizeof(plane)); } else { log_warning(("the plane with id=%d already exists.\n", id)); } diff --git a/src/eressea/lua/gamecode.cpp b/src/eressea/lua/gamecode.cpp index 55796a359..f9080572e 100644 --- a/src/eressea/lua/gamecode.cpp +++ b/src/eressea/lua/gamecode.cpp @@ -131,8 +131,10 @@ read_game(const char * filename, const char * mode) int rv, m = IO_TEXT; if (strcmp(mode, "binary")==0) m = IO_BINARY; rv = readgame(filename, m, false); - log_printf(" - Korrekturen Runde %d\n", turn); - korrektur(); + if (rv==0) { + log_printf(" - Korrekturen Runde %d\n", turn); + korrektur(); + } return rv; }