Actually use the lua argc
This commit is contained in:
+11
-4
@@ -956,11 +956,18 @@ staticfn int
|
|||||||
l_selection_size_description(lua_State *L)
|
l_selection_size_description(lua_State *L)
|
||||||
{
|
{
|
||||||
int argc = lua_gettop(L);
|
int argc = lua_gettop(L);
|
||||||
struct selectionvar *sel = l_selection_check(L, 1);
|
|
||||||
char buf[BUFSZ];
|
|
||||||
|
|
||||||
lua_pushstring(L, selection_size_description(sel, buf));
|
if (argc == 1) {
|
||||||
return 1;
|
struct selectionvar *sel = l_selection_check(L, 1);
|
||||||
|
char buf[BUFSZ];
|
||||||
|
|
||||||
|
lua_pushstring(L, selection_size_description(sel, buf));
|
||||||
|
return 1;
|
||||||
|
} else {
|
||||||
|
nhl_error(L, "wrong parameters");
|
||||||
|
/*NOTREACHED*/
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static const struct luaL_Reg l_selection_methods[] = {
|
static const struct luaL_Reg l_selection_methods[] = {
|
||||||
|
|||||||
Reference in New Issue
Block a user