From: Felix Fietkau Date: Sat, 23 Aug 2008 09:14:15 +0000 (+0200) Subject: fix 4-arg uci.set() X-Git-Url: https://git.archive.openwrt.org/?p=project%2Fuci.git;a=commitdiff_plain;h=edb952a2974c82b76e2bb85d1de58cc461e14601 fix 4-arg uci.set() --- 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; }