Use luaL_argerror over luaL_error in cl.parseopts

This commit is contained in:
Jeremy Baxter 2023-07-09 21:43:04 +12:00
parent 9329d60c45
commit ca54eca195

2
lcl.c
View file

@ -240,7 +240,7 @@ cl_parseopts(lua_State *L)
}
if (optstring[0] == ':')
return luaL_error(L, "option string may not start with a colon (:)");
return luaL_argerror(L, 2, "option string must not start with a colon (:)");
strprepend(optstring, ":");