aboutsummaryrefslogtreecommitdiffstats
path: root/builtin.c
diff options
context:
space:
mode:
Diffstat (limited to 'builtin.c')
-rw-r--r--builtin.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/builtin.c b/builtin.c
index d85d3dbd..b12844c3 100644
--- a/builtin.c
+++ b/builtin.c
@@ -2757,6 +2757,8 @@ do_sub(int nargs, unsigned int flags)
if ((t1->flags & NUMCUR) != 0)
goto set_how_many;
+ warning(_("gensub: third argument of `%.*s' treated as 1"),
+ (int) t1->stlen, t1->stptr);
how_many = 1;
}
} else {
@@ -2769,8 +2771,8 @@ set_how_many:
how_many = d;
else
how_many = LONG_MAX;
- if (d == 0)
- warning(_("gensub: third argument of 0 treated as 1"));
+ if (d <= 0)
+ warning(_("gensub: third argument of %g treated as 1"), d);
}
DEREF(t1);