From 9f517068b8c02416f30a4c77843354e762942a8c Mon Sep 17 00:00:00 2001 From: Andreas Weigel Date: Mon, 1 Mar 2021 14:17:43 -0500 Subject: [PATCH] lws_struct: fix implicit schema recognition actually use the index to iterate through the map of children to not only match the first ever occurring entry --- lib/misc/lws-struct-lejp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/misc/lws-struct-lejp.c b/lib/misc/lws-struct-lejp.c index a4864726c..2e7ba0793 100644 --- a/lib/misc/lws-struct-lejp.c +++ b/lib/misc/lws-struct-lejp.c @@ -51,10 +51,10 @@ lws_struct_schema_only_lejp_cb(struct lejp_ctx *ctx, char reason) */ while (n--) { - const lws_struct_map_t *child = map->child_map; int m, child_members = (int)map->child_map_size; for (m = 0; m < child_members; m++) { + const lws_struct_map_t *child = &map->child_map[m]; if (!strcmp(ctx->path, child->colname)) { /* * We matched on him... map is pointing