diff --git a/src/eressea/korrektur.c b/src/eressea/korrektur.c index a5776898d..07684e10a 100644 --- a/src/eressea/korrektur.c +++ b/src/eressea/korrektur.c @@ -1021,14 +1021,15 @@ fix_attribflags(void) for (u=r->units;u!=NULL;u=u->next) { const attrib *a = r->attribs; while (a) { - if (a->type!=&at_guard) { + if (a->type==&at_guard) { fset(u, UFL_GUARD); + break; } a = a->next; - return a; } } } + return 0; } static int diff --git a/src/eressea/server.cpp b/src/eressea/server.cpp index a3c8171d2..ec41ff34b 100644 --- a/src/eressea/server.cpp +++ b/src/eressea/server.cpp @@ -87,6 +87,7 @@ #include #include #include +#include /* lua includes */ #include "lua/bindings.h" @@ -700,6 +701,7 @@ main(int argc, char *argv[]) } #endif } + malloc_stats(); #ifdef CLEANUP_CODE game_done(); #endif