From: Felix Fietkau Date: Wed, 27 Aug 2008 14:43:40 +0000 (+0200) Subject: fix incomplete lookups for uci.get() X-Git-Url: https://git.archive.openwrt.org/?p=project%2Fuci.git;a=commitdiff_plain;h=289e14f9fa5472589b85bdae102aece71d858ecd fix incomplete lookups for uci.get() --- diff --git a/lua/uci.c b/lua/uci.c index f87ce27..7f4ba99 100644 --- a/lua/uci.c +++ b/lua/uci.c @@ -296,6 +296,10 @@ uci_lua_get_any(lua_State *L, bool all) err = UCI_ERR_INVAL; goto error; } + if (!(ptr.flags & UCI_LOOKUP_COMPLETE)) { + err = UCI_ERR_NOTFOUND; + goto error; + } err = UCI_OK; e = ptr.last;