diff --git a/src/ai.c b/src/ai.c index 3ec9f23..b157de3 100644 --- a/src/ai.c +++ b/src/ai.c @@ -1025,6 +1025,7 @@ static int ai_face(lua_State* L) { vect_cset(&tv, VX(p->solid->pos), VY(p->solid->pos)); lv = NULL; } + else LLUA_INVALID_PARAMETER(); } else if(lua_isvector(L, 1)) lv = lua_tovector(L, 1); diff --git a/src/map.c b/src/map.c index ed87c97..6fb3100 100644 --- a/src/map.c +++ b/src/map.c @@ -223,9 +223,10 @@ static void map_update(unsigned int wid) { } /* Get planets. */ - if(sys->nplanets == 0) - window_modifyText(wid, "txtPlanets", "None"); - else { + if(sys->nplanets == 0) { + strncpy(buf, "None", 128); + window_modifyText(wid, "txtPlanets", buf); + } else { buf[0] = '\0'; if(sys->nplanets > 0) strcat(buf, sys->planets[0]->name);