Fix error message for too long sprite names

This commit is contained in:
LJ Sonic 2024-03-16 19:35:56 +01:00
parent dc3436df78
commit 7371566592
2 changed files with 2 additions and 2 deletions

View file

@ -62,7 +62,7 @@ static inline int lib_freeslot(lua_State *L)
spritenum_t j;
if (strlen(word) > MAXSPRITENAME)
return luaL_error(L, "Sprite name is longer than %s characters\n", sizeu1(strlen(word)));
return luaL_error(L, "Sprite name is longer than %d characters\n", MAXSPRITENAME);
for (j = SPR_FIRSTFREESLOT; j <= SPR_LASTFREESLOT; j++)
{

View file

@ -441,7 +441,7 @@ void readfreeslots(MYFILE *f)
else if (fastcmp(type, "SPR"))
{
if (strlen(word) > MAXSPRITENAME)
I_Error("Sprite name is longer than %s characters\n", sizeu1(strlen(word)));
I_Error("Sprite name is longer than %d characters\n", MAXSPRITENAME);
for (i = SPR_FIRSTFREESLOT; i <= SPR_LASTFREESLOT; i++)
{