Use luaL_argerror over luaL_error in cl.parseopts
This commit is contained in:
parent
9329d60c45
commit
ca54eca195
1 changed files with 1 additions and 1 deletions
2
lcl.c
2
lcl.c
|
@ -240,7 +240,7 @@ cl_parseopts(lua_State *L)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (optstring[0] == ':')
|
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, ":");
|
strprepend(optstring, ":");
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue