From 4baab2f8079a77b49408b5231f50c176920cf2d9 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Mon, 19 Oct 2009 13:33:27 +0200 Subject: [PATCH] lua: add uci.foreach() error handling patch by xMff --- lua/uci.c | 5 +++++ 1 file changed, 5 insertions(+) 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: -- 2.41.0