diff --git a/src/bind_storage.c b/src/bind_storage.c index d82ccd07f..dd67d93a8 100644 --- a/src/bind_storage.c +++ b/src/bind_storage.c @@ -36,7 +36,7 @@ static int tolua_storage_create(lua_State * L) FILE * F; F = fopen(filename, type); - if (!F) { + if (F) { gamedata *data = (gamedata *)calloc(1, sizeof(gamedata)); storage *store = (storage *)calloc(1, sizeof(storage)); data->store = store; diff --git a/src/kernel/unit.h b/src/kernel/unit.h index 86d4c08e4..606bccbcf 100644 --- a/src/kernel/unit.h +++ b/src/kernel/unit.h @@ -89,11 +89,11 @@ extern "C" { struct faction *faction; struct building *building; struct ship *ship; - unsigned short number; /* persons */ - short age; + int number; /* persons */ + int age; /* skill data */ - short skill_size; + int skill_size; struct skill *skills; struct item *items; reservation *reservations;