From 171fc5d439fa0c7da4cd3eee59df17efa021cbb2 Mon Sep 17 00:00:00 2001 From: Robert Spalek Date: Mon, 24 Apr 2006 11:12:44 +0200 Subject: [PATCH] conf2: report a bug when mixing line- and block- syntax improperly --- lib/conf2.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/conf2.c b/lib/conf2.c index 5ae93b58..670bf73d 100644 --- a/lib/conf2.c +++ b/lib/conf2.c @@ -880,8 +880,11 @@ interpret_line(byte *name, enum cf_operation op, int number, byte **pars) return msg; if (stack[level].op & OP_1ST) TRY( record_selector(item, stack[level].sec, &stack[level].mask) ); - if (op & OP_OPEN) // the operation will be performed after the closing brace + if (op & OP_OPEN) { // the operation will be performed after the closing brace + if (number) + return "Cannot open a block after a parameter has been passed on a line"; return opening_brace(item, ptr, op); + } if (!item) // ignored item in an unknown section return NULL; op &= OP_MASK; -- 2.39.2