From: Felix Fietkau Date: Mon, 19 Oct 2009 11:33:27 +0000 (+0200) Subject: lua: add uci.foreach() error handling patch by xMff X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=4baab2f8079a77b49408b5231f50c176920cf2d9;p=uci.git lua: add uci.foreach() error handling patch by xMff --- diff --git a/lua/uci.c b/lua/uci.c index d16a0fd..4bc4ba2 100644 --- a/lua/uci.c +++ b/lua/uci.c @@ -302,6 +302,11 @@ uci_lua_foreach(lua_State *L) if (lua_isboolean(L, -1) && !lua_toboolean(L, -1)) break; } + else + { + lua_error(L); + break; + } } done: