]> pilppa.org Git - uci.git/commitdiff
lua: add uci.foreach() error handling patch by xMff
authorFelix Fietkau <nbd@pi.lan>
Mon, 19 Oct 2009 11:33:27 +0000 (13:33 +0200)
committerFelix Fietkau <nbd@pi.lan>
Mon, 19 Oct 2009 11:33:27 +0000 (13:33 +0200)
lua/uci.c

index d16a0fd818e3e48fa97409d9211977f9e6b10d15..4bc4ba26c959fd776fb952c88324a3d79fef79c2 100644 (file)
--- 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: