[Fix] Should remove the majority of Valgrind errors.
This commit is contained in:
parent
e10e6d4bcb
commit
cc3955c445
1
src/ai.c
1
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);
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user