summaryrefslogtreecommitdiffstats
path: root/openbsd-compat/bsd-snprintf.c
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@zip.com.au>2004-09-23 21:35:09 +1000
committerDarren Tucker <dtucker@zip.com.au>2004-09-23 21:35:09 +1000
commit4127f559ada4573e66c0e55dc920147d73e48974 (patch)
tree633668366d93093286bbff51a54a27c09ab31925 /openbsd-compat/bsd-snprintf.c
parent5d596139d43743004524a23693851211d3327718 (diff)
- (dtucker) [openbsd-compat/bsd-snprintf.c] Previous change was off by one,
which could have caused the justification to be wrong. ok djm@
Diffstat (limited to 'openbsd-compat/bsd-snprintf.c')
-rw-r--r--openbsd-compat/bsd-snprintf.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/openbsd-compat/bsd-snprintf.c b/openbsd-compat/bsd-snprintf.c
index aea501c6..b5a7ef7a 100644
--- a/openbsd-compat/bsd-snprintf.c
+++ b/openbsd-compat/bsd-snprintf.c
@@ -58,7 +58,7 @@
#include "includes.h"
-RCSID("$Id: bsd-snprintf.c,v 1.8 2004/09/21 11:32:13 dtucker Exp $");
+RCSID("$Id: bsd-snprintf.c,v 1.9 2004/09/23 11:35:09 dtucker Exp $");
#if defined(BROKEN_SNPRINTF) /* For those with broken snprintf() */
# undef HAVE_SNPRINTF
@@ -369,7 +369,7 @@ fmtstr(char *buffer, size_t *currlen, size_t maxlen,
if (value == 0)
value = "<NULL>";
- for (strln = 0; strln <= max && value[strln]; ++strln); /* strlen */
+ for (strln = 0; strln < max && value[strln]; ++strln); /* strlen */
padlen = min - strln;
if (padlen < 0)
padlen = 0;