diff options
author | Ulrich Drepper <drepper@redhat.com> | 1999-11-18 02:59:57 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 1999-11-18 02:59:57 +0000 |
commit | 35946fb706d6333c5c11663fd0b46c1e9116ae0f (patch) | |
tree | 9dd3397b3e3b8214bf8a05773489ba854c97d065 /wcsmbs/wcswidth.c | |
parent | 404127bca0508b64a40b6e77161cd555124408fa (diff) | |
download | glibc-35946fb706d6333c5c11663fd0b46c1e9116ae0f.tar glibc-35946fb706d6333c5c11663fd0b46c1e9116ae0f.tar.gz glibc-35946fb706d6333c5c11663fd0b46c1e9116ae0f.tar.bz2 glibc-35946fb706d6333c5c11663fd0b46c1e9116ae0f.zip |
Update.
* wcsmbs/wcswidth.c (wcswidth): Don't forget to decrement counter n.
Diffstat (limited to 'wcsmbs/wcswidth.c')
-rw-r--r-- | wcsmbs/wcswidth.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/wcsmbs/wcswidth.c b/wcsmbs/wcswidth.c index 2828b800da..78fc427276 100644 --- a/wcsmbs/wcswidth.c +++ b/wcsmbs/wcswidth.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1996, 1997 Free Software Foundation, Inc. +/* Copyright (C) 1996, 1997, 1999 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1996. @@ -26,7 +26,7 @@ wcswidth (const wchar_t *s, size_t n) { int result = 0; - while (n > 0 && *s != L'\0') + while (n-- > 0 && *s != L'\0') { int now = internal_wcwidth (*s); if (now == -1) |