summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2008-08-27 23:05:21 +0200
committerFelix Fietkau <nbd@openwrt.org>2008-08-27 23:05:21 +0200
commit43124956bc9c1083e476f6cadaedf27b7788d004 (patch)
treee39bb4fbd85d9b6c69e6259d8962b3bfcc143e77
parent793be3e2557cef8e651e482ac4a865b2a8e00599 (diff)
downloaduci-43124956bc9c1083e476f6cadaedf27b7788d004.tar.gz
fix uci.save() with cursorsv0.6.1
-rw-r--r--lua/uci.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lua/uci.c b/lua/uci.c
index 5d8490c..50321fb 100644
--- a/lua/uci.c
+++ b/lua/uci.c
@@ -506,7 +506,7 @@ uci_lua_package_cmd(lua_State *L, enum pkg_cmd cmd)
ctx = find_context(L, &offset);
nargs = lua_gettop(L);
- if ((cmd != CMD_REVERT) && (nargs > 1))
+ if ((cmd != CMD_REVERT) && (nargs - offset > 1))
goto err;
if (lookup_args(L, ctx, offset, &ptr, &s))