fix a bug in blobmsg_parse

a second entry that has the same length as an existing found entry would
abort the parse loop (reported by Stefan Mächler)
This commit is contained in:
Felix Fietkau 2011-08-17 10:44:11 -07:00
parent f1a44355bd
commit 1d3e4ccb6a

View file

@ -89,7 +89,7 @@ int blobmsg_parse(const struct blobmsg_policy *policy, int policy_len,
return -1; return -1;
if (tb[i]) if (tb[i])
return -1; continue;
if (strcmp(policy[i].name, (char *) hdr->name) != 0) if (strcmp(policy[i].name, (char *) hdr->name) != 0)
continue; continue;