summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>2001-08-18 20:34:39 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>2001-08-18 20:34:39 +0000
commit79195842d32568913ad91e673b5e6c24beef041d (patch)
treea4eae6081c2079460f403b241381cd32d8ea78b4
parentad9b20487ca0cace582bf9cbe2d0928c6352d3b9 (diff)
Fix a pasto I made when adding snprintf() return val checks ages ago.
-rw-r--r--usr.bin/vi/common/api.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/vi/common/api.c b/usr.bin/vi/common/api.c
index 3cb31f88911..6f678d17f97 100644
--- a/usr.bin/vi/common/api.c
+++ b/usr.bin/vi/common/api.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: api.c,v 1.9 2001/01/29 01:58:28 niklas Exp $ */
+/* $OpenBSD: api.c,v 1.10 2001/08/18 20:34:38 millert Exp $ */
/*-
* Copyright (c) 1992, 1993, 1994
@@ -502,8 +502,8 @@ api_opts_set(sp, name, str_value, num_value, bool_value)
case OPT_STR:
GET_SPACE_RET(sp, bp, blen, 1024);
a.len = snprintf(bp, 1024, "%s=%s", name, str_value);
- if (a.len > 63)
- a.len = 63;
+ if (a.len > 1023)
+ a.len = 1023;
break;
}
a.bp = bp;