Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2009-03-25 16:54:41 +0300
committerCorinna Vinschen <corinna@vinschen.de>2009-03-25 16:54:41 +0300
commitb10a036a926fb8abb2315efdf38880f7dfea7f4d (patch)
tree6a18910e9c0fb4dd799016ee4a54fcfd34c3554c /winsup/cygwin/strfuncs.cc
parent6396c8889f45e2c2454e4756812f4033e33b13f3 (diff)
* strfuncs.cc (sys_wcstombs): Don't convert ASCII SO into two
ASCII SO's.
Diffstat (limited to 'winsup/cygwin/strfuncs.cc')
-rw-r--r--winsup/cygwin/strfuncs.cc5
1 files changed, 2 insertions, 3 deletions
diff --git a/winsup/cygwin/strfuncs.cc b/winsup/cygwin/strfuncs.cc
index adadc32b7..03e14c015 100644
--- a/winsup/cygwin/strfuncs.cc
+++ b/winsup/cygwin/strfuncs.cc
@@ -320,9 +320,8 @@ sys_wcstombs (char *dst, size_t len, const PWCHAR src, size_t nwc)
pw &= 0xff;
int bytes = _wctomb_r (_REENT, buf, pw, &ps);
/* Convert chars invalid in the current codepage to a sequence
- ASCII SO; UTF-8 representation of invalid char.
- Do the same for ASCII SO itself. */
- if ((bytes == -1 || pw == 0x0e) && *__locale_charset () != 'U'/*TF-8*/)
+ ASCII SO; UTF-8 representation of invalid char. */
+ if (bytes == -1 && *__locale_charset () != 'U'/*TF-8*/)
{
buf[0] = 0x0e; /* ASCII SO */
bytes = __utf8_wctomb (_REENT, buf + 1, pw, __locale_charset (), &ps);