* smallprint.cc (__small_vsprintf): Simplify UNICODE string handling
and allow empty strings.
This commit is contained in:
parent
cbea3f7d93
commit
c94a1006c6
@ -1,3 +1,8 @@
|
||||
2009-10-20 Corinna Vinschen <corinna@vinschen.de>
|
||||
|
||||
* smallprint.cc (__small_vsprintf): Simplify UNICODE string handling
|
||||
and allow empty strings.
|
||||
|
||||
2009-10-20 Corinna Vinschen <corinna@vinschen.de>
|
||||
|
||||
* fhandler_disk_file.cc (fhander_disk_file::readdir): Handle a status
|
||||
|
@ -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:
|
||||
|
Loading…
x
Reference in New Issue
Block a user