summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/vi/ex/ex_subst.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/vi/ex/ex_subst.c b/usr.bin/vi/ex/ex_subst.c
index 566d2fb4dd3..4ff100dbdd9 100644
--- a/usr.bin/vi/ex/ex_subst.c
+++ b/usr.bin/vi/ex/ex_subst.c
@@ -415,12 +415,12 @@ s(sp, cmdp, s, re, flags)
if (lno != OOBLNO)
goto usage;
errno = 0;
- if ((ul = strtoul(s, &s, 10)) > UINT_MAX)
+ if ((ul = strtoul(s, &s, 10)) >= UINT_MAX)
errno = ERANGE;
if (*s == '\0') /* Loop increment correction. */
--s;
if (errno == ERANGE) {
- if (ul > UINT_MAX)
+ if (ul >= UINT_MAX)
msgq(sp, M_ERR, "153|Count overflow");
else
msgq(sp, M_SYSERR, NULL);