fix a bug in blobmsg_parse
authorFelix Fietkau <nbd@openwrt.org>
Wed, 17 Aug 2011 17:44:11 +0000 (10:44 -0700)
committerFelix Fietkau <nbd@openwrt.org>
Wed, 17 Aug 2011 17:44:11 +0000 (10:44 -0700)
a second entry that has the same length as an existing found entry would
abort the parse loop (reported by Stefan Mächler)

blobmsg.c

index 15dc75004d647cdbdef0b851f6059120faae3daf..3079dcacb24a135e01c3b1bfed7e0d500779cfed 100644 (file)
--- a/blobmsg.c
+++ b/blobmsg.c
@@ -89,7 +89,7 @@ int blobmsg_parse(const struct blobmsg_policy *policy, int policy_len,
                                return -1;
 
                        if (tb[i])
-                               return -1;
+                               continue;
 
                        if (strcmp(policy[i].name, (char *) hdr->name) != 0)
                                continue;