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-05-08 23:38:33 +0400
committerCorinna Vinschen <corinna@vinschen.de>2009-05-08 23:38:33 +0400
commit0e6edb13c6bf63f5122459b30793a7dc3c00c1e6 (patch)
tree4a1402db24cfd18d510f8952d55f7eeaf9b96534 /winsup/cygwin/strfuncs.cc
parent415867c378925543e804afc6a4155a571276751d (diff)
* strfuncs.cc (sys_cp_wcstombs): Set errno to 0 before converting
wide char to SO/UTF-8 sequence.
Diffstat (limited to 'winsup/cygwin/strfuncs.cc')
-rw-r--r--winsup/cygwin/strfuncs.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/winsup/cygwin/strfuncs.cc b/winsup/cygwin/strfuncs.cc
index 110fe8f16..75ca3db28 100644
--- a/winsup/cygwin/strfuncs.cc
+++ b/winsup/cygwin/strfuncs.cc
@@ -432,6 +432,7 @@ sys_cp_wcstombs (wctomb_p f_wctomb, char *charset, char *dst, size_t len,
ASCII SO; UTF-8 representation of invalid char. */
if (bytes == -1 && *charset != 'U'/*TF-8*/)
{
+ _REENT->_errno = 0;
buf[0] = 0x0e; /* ASCII SO */
bytes = __utf8_wctomb (_REENT, buf + 1, pw, charset, &ps);
if (bytes == -1)