Skip to content

Commit

Permalink
Fix use of mgos_conf_emit_cb
Browse files Browse the repository at this point in the history
  • Loading branch information
rojer committed Nov 11, 2021
1 parent ea43740 commit 29114d1
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/mgos_config_util.c
Original file line number Diff line number Diff line change
Expand Up @@ -612,8 +612,9 @@ bool mgos_config_get(const struct mg_str key, struct mg_str *value,
case CONF_TYPE_OBJECT: {
struct mbuf mb;
mbuf_init(&mb, 0);
mgos_conf_emit_cb(cfg, NULL /* base */, e, false /* pretty */, &mb,
NULL /* cb */, NULL /* cb_param */);
mgos_conf_emit_cb(((char *) cfg) + e->offset, NULL /* base */, e,
false /* pretty */, &mb, NULL /* cb */,
NULL /* cb_param */);
value->p = mb.buf;
value->len = mb.len;
break;
Expand Down

0 comments on commit 29114d1

Please sign in to comment.