Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libc/gen off by one.
details: https://anonhg.NetBSD.org/src/rev/17d1423c85e2
branches: trunk
changeset: 784938:17d1423c85e2
user: christos <christos%NetBSD.org@localhost>
date: Thu Feb 14 13:57:53 2013 +0000
description:
off by one.
diffstat:
lib/libc/gen/vis.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (27 lines):
diff -r e727cfd12637 -r 17d1423c85e2 lib/libc/gen/vis.c
--- a/lib/libc/gen/vis.c Thu Feb 14 12:44:16 2013 +0000
+++ b/lib/libc/gen/vis.c Thu Feb 14 13:57:53 2013 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: vis.c,v 1.51 2013/02/13 22:19:18 christos Exp $ */
+/* $NetBSD: vis.c,v 1.52 2013/02/14 13:57:53 christos Exp $ */
/*-
* Copyright (c) 1989, 1993
@@ -57,7 +57,7 @@
#include <sys/cdefs.h>
#if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: vis.c,v 1.51 2013/02/13 22:19:18 christos Exp $");
+__RCSID("$NetBSD: vis.c,v 1.52 2013/02/14 13:57:53 christos Exp $");
#endif /* LIBC_SCCS and not lint */
#ifdef __FBSDID
__FBSDID("$FreeBSD$");
@@ -313,7 +313,7 @@
src = psrc;
mbslength = (ssize_t)mblength;
- while (mbslength > 0) {
+ while (mbslength >= 0) {
clen = mbtowc(src, mbsrc, MB_LEN_MAX);
if (clen < 0) {
*src = (wint_t)(u_char)*mbsrc;
Home |
Main Index |
Thread Index |
Old Index