From f4795dcabbd3f052de50b99881a2c0dd4c42d4b7 Mon Sep 17 00:00:00 2001 From: Robert Spalek Date: Sun, 23 Apr 2006 11:41:15 +0200 Subject: [PATCH] conf2: 2 bugfixes concerning dynamic arrays and lists --- lib/conf2.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/lib/conf2.c b/lib/conf2.c index 57e9c353..4fe9280b 100644 --- a/lib/conf2.c +++ b/lib/conf2.c @@ -696,7 +696,7 @@ interpret_set_item(struct cf_item *item, int number, byte **pars, int *processed case CC_LIST: if (!allow_dynamic) return "Lists cannot be used here"; - return interpret_add_list(item, number, pars, ptr, processed, OP_SET); + return interpret_add_list(item, number, pars, processed, ptr, OP_SET); default: ASSERT(0); } @@ -1299,12 +1299,15 @@ dump_item(struct fastbuf *fb, struct cf_item *item, int level, void *ptr) if (item->cls == CC_STATIC) { for (i=0; inumber; i++) dump_basic(fb, ptr + i * parsers[type].size, type); - } else if (0 && item->cls == CC_DYNAMIC) { + } else if (item->cls == CC_DYNAMIC) { ptr = * (void**) ptr; - int real_nr = * (int*) (ptr - parsers[type].size); - bprintf(fb, "##%d ", real_nr); - for (i=0; icls == CC_SECTION) -- 2.39.2