From: Stepan Kasal Date: Fri, 13 May 2005 09:16:44 +0000 (+0000) Subject: (m4_bmatch): Check the number of args. X-Git-Tag: AUTOCONF-2.59c~390 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=4a38c32eb87c70c147599d47650bbdc1d2aa1a46;p=thirdparty%2Fautoconf.git (m4_bmatch): Check the number of args. --- diff --git a/lib/m4sugar/m4sugar.m4 b/lib/m4sugar/m4sugar.m4 index 05dd6411a..a8cc5c0df 100644 --- a/lib/m4sugar/m4sugar.m4 +++ b/lib/m4sugar/m4sugar.m4 @@ -374,8 +374,8 @@ m4_define([m4_case], # All the values are optional, and the macro is robust to active symbols # properly quoted. m4_define([m4_bmatch], -[m4_if([$#], 0, [], - [$#], 1, [], +[m4_if([$#], 0, [m4_fatal([$0: too few arguments: $#])], + [$#], 1, [m4_fatal([$0: too few arguments: $#: $1])], [$#], 2, [$2], [m4_if(m4_bregexp([$1], [$2]), -1, [$0([$1], m4_shiftn(3, $@))], [$3])])])