summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@pi.lan>2008-08-23 11:14:15 +0200
committerFelix Fietkau <nbd@pi.lan>2008-08-23 11:14:15 +0200
commitedb952a2974c82b76e2bb85d1de58cc461e14601 (patch)
tree77014ff6c98d60eb15fa817c633cf24b833784b2
parent600ce9acc5efadd699243f889462b982b83052f2 (diff)
downloaduci-edb952a2974c82b76e2bb85d1de58cc461e14601.tar.gz
fix 4-arg uci.set()
-rw-r--r--lua/uci.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/lua/uci.c b/lua/uci.c
index b64c91f..e833b86 100644
--- a/lua/uci.c
+++ b/lua/uci.c
@@ -119,6 +119,7 @@ lookup_args(lua_State *L, struct uci_ptr *ptr, char **buf)
goto error;
switch (n) {
+ case 4:
case 3:
ptr->option = luaL_checkstring(L, 3);
/* fall through */
@@ -133,6 +134,7 @@ lookup_args(lua_State *L, struct uci_ptr *ptr, char **buf)
goto error;
break;
default:
+ luaL_error(L, "invalid argument count");
goto error;
}