mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-01-31 05:30:48 +00:00
A bit of cleaning
This commit is contained in:
parent
0f9e3554e2
commit
74cfeaff30
2 changed files with 3 additions and 5 deletions
|
@ -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"))
|
||||
{
|
||||
|
|
|
@ -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"))
|
||||
|
|
Loading…
Reference in a new issue