return;
if (value)
- size += strlen(section) + 1;
+ size += strlen(value) + 1;
h = uci_alloc_element(ctx, history, option, size);
ptr = uci_dataptr(h);
goto notfound;
s = uci_to_section(e);
- if (ctx->pctx)
+ if (ctx->pctx && ctx->pctx->merge)
ctx->pctx->section = s;
if (option) {
uci_alloc_option(s, option, value);
else {
s = uci_alloc_section(p, value, section);
- if (ctx->pctx)
+ if (ctx->pctx && ctx->pctx->merge)
ctx->pctx->section = s;
}