1
0
Fork 0
mirror of https://github.com/warmcat/libwebsockets.git synced 2025-03-09 00:00:04 +01:00

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
This commit is contained in:
Andreas Weigel 2021-03-01 14:17:43 -05:00 committed by Andy Green
parent 9af105ebf8
commit d1763df9ed

View file

@ -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