aboutsummaryrefslogtreecommitdiffstats
path: root/builtin.c
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2015-01-07 22:29:00 +0200
committerArnold D. Robbins <arnold@skeeve.com>2015-01-07 22:29:00 +0200
commit2ff844d50c0ecbc4dc660cf7e8989476f56fb3e7 (patch)
treeac6cc36b861228c3876ddcec7eebedd53e6eb290 /builtin.c
parentf19d6c877ef2e467965b6fec2561be8b8ca5db94 (diff)
parentb1f63ac08d7da89ac7e8af4df5ca835527fc5b24 (diff)
downloadegawk-2ff844d50c0ecbc4dc660cf7e8989476f56fb3e7.tar.gz
egawk-2ff844d50c0ecbc4dc660cf7e8989476f56fb3e7.tar.bz2
egawk-2ff844d50c0ecbc4dc660cf7e8989476f56fb3e7.zip
Merge branch 'gawk-4.1-stable'
Diffstat (limited to 'builtin.c')
-rw-r--r--builtin.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/builtin.c b/builtin.c
index 21c6ed5c..50017c48 100644
--- a/builtin.c
+++ b/builtin.c
@@ -3,7 +3,7 @@
*/
/*
- * Copyright (C) 1986, 1988, 1989, 1991-2014 the Free Software Foundation, Inc.
+ * Copyright (C) 1986, 1988, 1989, 1991-2015 the Free Software Foundation, Inc.
*
* This file is part of GAWK, the GNU implementation of the
* AWK Programming Language.
@@ -904,7 +904,10 @@ check_pos:
case '*':
if (cur == NULL)
break;
- if (! do_traditional && isdigit((unsigned char) *s1)) {
+ if (! do_traditional && used_dollar && ! isdigit((unsigned char) *s1)) {
+ fatal(_("fatal: must use `count$' on all formats or none"));
+ break; /* silence warnings */
+ } else if (! do_traditional && isdigit((unsigned char) *s1)) {
int val = 0;
for (; n0 > 0 && *s1 && isdigit((unsigned char) *s1); s1++, n0--) {