summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lua/uci.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lua/uci.c b/lua/uci.c
index 6ba7da0..1cb31a5 100644
--- a/lua/uci.c
+++ b/lua/uci.c
@@ -303,7 +303,7 @@ uci_lua_foreach(lua_State *L)
ctx = find_context(L, &offset);
package = luaL_checkstring(L, 1 + offset);
- if (lua_isnil(L, 2))
+ if (lua_isnil(L, 2 + offset))
type = NULL;
else
type = luaL_checkstring(L, 2 + offset);