A bit of cleaning

This commit is contained in:
kaysrishaq 2020-07-12 07:56:25 -04:00
parent 0f9e3554e2
commit 74cfeaff30
2 changed files with 3 additions and 5 deletions

View File

@ -840,7 +840,7 @@ static void readskincolor(MYFILE *f, INT32 num)
deh_warning("Skincolor %d: name %s is a duplicate of another skincolor's name - renamed to %s", num, oldword, truncword);
}
deh_strlcpy(skincolors[num].name, truncword, namesize, NULL); // already truncated
strlcpy(skincolors[num].name, truncword, namesize); // already truncated
}
else if (fastcmp(word, "RAMP"))
{

View File

@ -1561,8 +1561,7 @@ static int lib_setSkinColor(lua_State *L)
UINT16 v = (UINT16)luaL_checkinteger(L, 3);
if (v >= numskincolors)
return luaL_error(L, "attempt to set skincolors[%d].invcolor to out of range value %d.", cnum, v);
else
info->invcolor = v;
info->invcolor = v;
} else if (i == 4 || (str && fastcmp(str,"invshade")))
info->invshade = (UINT8)luaL_checkinteger(L, 3)%COLORRAMPSIZE;
else if (i == 5 || (str && fastcmp(str,"chatcolor")))
@ -1644,8 +1643,7 @@ static int skincolor_set(lua_State *L)
UINT16 v = (UINT16)luaL_checkinteger(L, 3);
if (v >= numskincolors)
return luaL_error(L, "attempt to set skincolor_t field 'invcolor' to out of range value %d.", v);
else
info->invcolor = v;
info->invcolor = v;
} else if (fastcmp(field,"invshade"))
info->invshade = (UINT8)luaL_checkinteger(L, 3)%COLORRAMPSIZE;
else if (fastcmp(field,"chatcolor"))