diff options
author | Jeff Johnston <jjohnstn@redhat.com> | 2008-08-27 18:31:04 +0000 |
---|---|---|
committer | Jeff Johnston <jjohnstn@redhat.com> | 2008-08-27 18:31:04 +0000 |
commit | 2d8d8175f1188b355dad77080e07ebc202d8cf37 (patch) | |
tree | d907272c87c47c951daac0ff5017bee66d9c2947 /newlib/libc/stdlib/wcsrtombs.c | |
parent | 7e73b9cfd7f8c0e287d9d810b36529b424064ed7 (diff) | |
download | cygnal-2d8d8175f1188b355dad77080e07ebc202d8cf37.tar.gz cygnal-2d8d8175f1188b355dad77080e07ebc202d8cf37.tar.bz2 cygnal-2d8d8175f1188b355dad77080e07ebc202d8cf37.zip |
2008-08-27 Corinna Vinschen <corinna@vinschen.de>
* libc/stdlib/wcsrtombs.c (_wcsrtombs_r): Fix condition for
accepting a converted character and continuing the loop.
Diffstat (limited to 'newlib/libc/stdlib/wcsrtombs.c')
-rw-r--r-- | newlib/libc/stdlib/wcsrtombs.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/newlib/libc/stdlib/wcsrtombs.c b/newlib/libc/stdlib/wcsrtombs.c index 6871d0c00..3c1dc4626 100644 --- a/newlib/libc/stdlib/wcsrtombs.c +++ b/newlib/libc/stdlib/wcsrtombs.c @@ -45,7 +45,7 @@ _DEFUN (_wcsrtombs_r, (r, dst, src, len, ps), ps->__count = 0; return (size_t)-1; } - if (n <= len - bytes && bytes < len) + if (n <= len - bytes && bytes <= len) { n += bytes; if (dst) |