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:
Diffstat (limited to 'winsup/cygwin/smallprint.cc')
-rw-r--r--winsup/cygwin/smallprint.cc13
1 files changed, 4 insertions, 9 deletions
diff --git a/winsup/cygwin/smallprint.cc b/winsup/cygwin/smallprint.cc
index 9a5cd1ac0..bf6fd67eb 100644
--- a/winsup/cygwin/smallprint.cc
+++ b/winsup/cygwin/smallprint.cc
@@ -195,16 +195,11 @@ __small_vsprintf (char *dst, const char *fmt, va_list ap)
if (!us)
RtlInitUnicodeString (us = &uw, L"(null)");
wfillin:
+ if (sys_wcstombs (tmp, NT_MAX_PATH, us->Buffer,
+ us->Length / sizeof (WCHAR)))
{
- if (!sys_wcstombs (tmp, NT_MAX_PATH, us->Buffer,
- us->Length / sizeof (WCHAR)))
- {
- s = "invalid UNICODE_STRING";
- goto fillin;
- }
- char *t = tmp;
- for (i = 0; *t && i < n; i++)
- *dst++ = *t++;
+ s = tmp;
+ goto fillin;
}
break;
default: