mirror of
https://github.com/reactos/reactos.git
synced 2024-07-31 08:39:05 +00:00
Fixed bugs in '%wZ' string output
svn path=/trunk/; revision=1017
This commit is contained in:
parent
48db9468eb
commit
6eb7010078
|
@ -1,4 +1,4 @@
|
||||||
/* $Id: sprintf.c,v 1.2 2000/02/21 22:37:57 ekohl Exp $
|
/* $Id: sprintf.c,v 1.3 2000/02/27 15:43:58 ekohl Exp $
|
||||||
*
|
*
|
||||||
* COPYRIGHT: See COPYING in the top level directory
|
* COPYRIGHT: See COPYING in the top level directory
|
||||||
* PROJECT: ReactOS kernel
|
* PROJECT: ReactOS kernel
|
||||||
|
@ -317,7 +317,7 @@ int _vsnprintf(char *buf, size_t cnt, const char *fmt, va_list args)
|
||||||
while ((*s) != 0)
|
while ((*s) != 0)
|
||||||
*str++ = *s++;
|
*str++ = *s++;
|
||||||
} else {
|
} else {
|
||||||
for (i = 0; pus->Buffer[i] && i < pus->Length; i++)
|
for (i = 0; pus->Buffer[i] && i < pus->Length / sizeof(WCHAR); i++)
|
||||||
*str++ = (unsigned char)(pus->Buffer[i]);
|
*str++ = (unsigned char)(pus->Buffer[i]);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* $Id: swprintf.c,v 1.4 2000/02/21 22:37:57 ekohl Exp $
|
/* $Id: swprintf.c,v 1.5 2000/02/27 15:43:58 ekohl Exp $
|
||||||
*
|
*
|
||||||
* COPYRIGHT: See COPYING in the top level directory
|
* COPYRIGHT: See COPYING in the top level directory
|
||||||
* PROJECT: ReactOS kernel
|
* PROJECT: ReactOS kernel
|
||||||
|
@ -341,7 +341,7 @@ int _vsnwprintf(wchar_t *buf, size_t cnt, const wchar_t *fmt, va_list args)
|
||||||
while ((*sw) != 0)
|
while ((*sw) != 0)
|
||||||
*str++ = *sw++;
|
*str++ = *sw++;
|
||||||
} else {
|
} else {
|
||||||
for (i = 0; pus->Buffer[i] && i < pus->Length; i++)
|
for (i = 0; pus->Buffer[i] && i < pus->Length / sizeof(WCHAR); i++)
|
||||||
*str++ = pus->Buffer[i];
|
*str++ = pus->Buffer[i];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* $Id: sprintf.c,v 1.2 2000/02/21 22:41:45 ekohl Exp $
|
/* $Id: sprintf.c,v 1.3 2000/02/27 15:43:10 ekohl Exp $
|
||||||
*
|
*
|
||||||
* COPYRIGHT: See COPYING in the top level directory
|
* COPYRIGHT: See COPYING in the top level directory
|
||||||
* PROJECT: ReactOS kernel
|
* PROJECT: ReactOS kernel
|
||||||
|
@ -316,7 +316,7 @@ int _vsnprintf(char *buf, size_t cnt, const char *fmt, va_list args)
|
||||||
while ((*s) != 0)
|
while ((*s) != 0)
|
||||||
*str++ = *s++;
|
*str++ = *s++;
|
||||||
} else {
|
} else {
|
||||||
for (i = 0; pus->Buffer[i] && i < pus->Length; i++)
|
for (i = 0; pus->Buffer[i] && i < pus->Length / sizeof(WCHAR); i++)
|
||||||
*str++ = (unsigned char)(pus->Buffer[i]);
|
*str++ = (unsigned char)(pus->Buffer[i]);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
/* $Id: swprintf.c,v 1.2 2000/02/21 22:41:45 ekohl Exp $
|
/* $Id: swprintf.c,v 1.3 2000/02/27 15:43:10 ekohl Exp $
|
||||||
*
|
*
|
||||||
* COPYRIGHT: See COPYING in the top level directory
|
* COPYRIGHT: See COPYING in the top level directory
|
||||||
* PROJECT: ReactOS kernel
|
* PROJECT: ReactOS kernel
|
||||||
|
@ -123,11 +123,11 @@ number (wchar_t *str, long long num, int base, int size, int precision,
|
||||||
{
|
{
|
||||||
if (base==8)
|
if (base==8)
|
||||||
{
|
{
|
||||||
*str++ = L'0';
|
*str++ = L'0';
|
||||||
}
|
}
|
||||||
else if (base==16)
|
else if (base==16)
|
||||||
{
|
{
|
||||||
*str++ = L'0';
|
*str++ = L'0';
|
||||||
*str++ = digits[33];
|
*str++ = digits[33];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -321,7 +321,7 @@ int _vsnwprintf(wchar_t *buf, size_t cnt, const wchar_t *fmt, va_list args)
|
||||||
}
|
}
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
case 'Z':
|
case L'Z':
|
||||||
if (qualifier == 'h') {
|
if (qualifier == 'h') {
|
||||||
/* print counted ascii string */
|
/* print counted ascii string */
|
||||||
PANSI_STRING pus = va_arg(args, PANSI_STRING);
|
PANSI_STRING pus = va_arg(args, PANSI_STRING);
|
||||||
|
@ -341,7 +341,7 @@ int _vsnwprintf(wchar_t *buf, size_t cnt, const wchar_t *fmt, va_list args)
|
||||||
while ((*sw) != 0)
|
while ((*sw) != 0)
|
||||||
*str++ = *sw++;
|
*str++ = *sw++;
|
||||||
} else {
|
} else {
|
||||||
for (i = 0; pus->Buffer[i] && i < pus->Length; i++)
|
for (i = 0; pus->Buffer[i] && i < pus->Length / sizeof(WCHAR); i++)
|
||||||
*str++ = pus->Buffer[i];
|
*str++ = pus->Buffer[i];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue