]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
(m4_bmatch): Check the number of args.
authorStepan Kasal <kasal@ucw.cz>
Fri, 13 May 2005 09:16:44 +0000 (09:16 +0000)
committerStepan Kasal <kasal@ucw.cz>
Fri, 13 May 2005 09:16:44 +0000 (09:16 +0000)
lib/m4sugar/m4sugar.m4

index 05dd6411a1c449e690e3419bf46ea25b63d0f49f..a8cc5c0dfa80b3cf59d713cf589d5e0e0e0409cf 100644 (file)
@@ -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])])])