[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));
|
vect_cset(&tv, VX(p->solid->pos), VY(p->solid->pos));
|
||||||
lv = NULL;
|
lv = NULL;
|
||||||
}
|
}
|
||||||
|
else LLUA_INVALID_PARAMETER();
|
||||||
}
|
}
|
||||||
else if(lua_isvector(L, 1))
|
else if(lua_isvector(L, 1))
|
||||||
lv = lua_tovector(L, 1);
|
lv = lua_tovector(L, 1);
|
||||||
|
@ -223,9 +223,10 @@ static void map_update(unsigned int wid) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* Get planets. */
|
/* Get planets. */
|
||||||
if(sys->nplanets == 0)
|
if(sys->nplanets == 0) {
|
||||||
window_modifyText(wid, "txtPlanets", "None");
|
strncpy(buf, "None", 128);
|
||||||
else {
|
window_modifyText(wid, "txtPlanets", buf);
|
||||||
|
} else {
|
||||||
buf[0] = '\0';
|
buf[0] = '\0';
|
||||||
if(sys->nplanets > 0)
|
if(sys->nplanets > 0)
|
||||||
strcat(buf, sys->planets[0]->name);
|
strcat(buf, sys->planets[0]->name);
|
||||||
|
Loading…
Reference in New Issue
Block a user