Revert usage warning to an error

This commit is contained in:
Radicalicious 2022-11-22 16:21:13 +00:00
parent 1edbbad2df
commit 31520a1a5d

View file

@ -441,7 +441,7 @@ int LUA_CheckGlobals(lua_State *L, const char *word)
const char *str = luaL_checklstring(L, 2, &strlength);
if (strlength > 6)
LUA_UsageWarning(L, "mapmusname: Music name too long - truncated to six characters.");
return luaL_error(L, "string length out of range (maximum 6 characters)");
if (strlen(str) < strlength)
return luaL_error(L, "string must not contain embedded zeros!");