diff options
author | Jeff Johnston <jjohnstn@redhat.com> | 2008-08-28 17:36:49 +0000 |
---|---|---|
committer | Jeff Johnston <jjohnstn@redhat.com> | 2008-08-28 17:36:49 +0000 |
commit | 60ac13a0b0676a6896b116309c93090fc140f23b (patch) | |
tree | c332fbb04aca605367c549af454a93358d819730 /newlib/libc/stdlib/wcsrtombs.c | |
parent | bfe1d1484760df34695b8be2eec8f3bc035031b9 (diff) | |
download | newlib-60ac13a0b0676a6896b116309c93090fc140f23b.zip newlib-60ac13a0b0676a6896b116309c93090fc140f23b.tar.gz newlib-60ac13a0b0676a6896b116309c93090fc140f23b.tar.bz2 |
2008-08-28 Corinna Vinschen <corinna@vinschen.de>
* libc/stdlib/wcsrtombs.c (_wcsrtombs_r): Optimize condition
for accepting a converted character.
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 3c1dc46..a16d36c 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 + bytes <= len) { n += bytes; if (dst) |