mirror of
https://github.com/reactos/reactos.git
synced 2025-07-24 23:33:49 +00:00
Fixed the conversion in MultiByteToWideChar. Wmc.exe does now running on ros.
svn path=/trunk/; revision=3571
This commit is contained in:
parent
7c651fda9c
commit
bf59f99dac
1 changed files with 5 additions and 14 deletions
|
@ -1,4 +1,4 @@
|
||||||
/* $Id: stubs.c,v 1.33 2002/09/23 19:20:34 sedwards Exp $
|
/* $Id: stubs.c,v 1.34 2002/09/27 15:29:03 hbirr Exp $
|
||||||
*
|
*
|
||||||
* KERNEL32.DLL stubs (unimplemented functions)
|
* KERNEL32.DLL stubs (unimplemented functions)
|
||||||
* Remove from this file, if you implement them.
|
* Remove from this file, if you implement them.
|
||||||
|
@ -993,7 +993,6 @@ MultiByteToWideChar (
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
int InStringLength = 0;
|
int InStringLength = 0;
|
||||||
BOOL InIsNullTerminated = TRUE;
|
|
||||||
PCHAR r;
|
PCHAR r;
|
||||||
PWCHAR w;
|
PWCHAR w;
|
||||||
int cchConverted;
|
int cchConverted;
|
||||||
|
@ -1008,7 +1007,7 @@ MultiByteToWideChar (
|
||||||
&& (FALSE == IsInstalledCP (CodePage))
|
&& (FALSE == IsInstalledCP (CodePage))
|
||||||
)
|
)
|
||||||
/* --- FLAGS --- */
|
/* --- FLAGS --- */
|
||||||
|| (dwFlags ^ ( MB_PRECOMPOSED
|
|| (dwFlags & ~(MB_PRECOMPOSED
|
||||||
| MB_COMPOSITE
|
| MB_COMPOSITE
|
||||||
| MB_ERR_INVALID_CHARS
|
| MB_ERR_INVALID_CHARS
|
||||||
| MB_USEGLYPHCHARS
|
| MB_USEGLYPHCHARS
|
||||||
|
@ -1026,11 +1025,10 @@ MultiByteToWideChar (
|
||||||
*/
|
*/
|
||||||
if (-1 == cchMultiByte)
|
if (-1 == cchMultiByte)
|
||||||
{
|
{
|
||||||
InStringLength = lstrlen (lpMultiByteStr);
|
InStringLength = lstrlen (lpMultiByteStr) + 1;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
InIsNullTerminated = FALSE;
|
|
||||||
InStringLength = cchMultiByte;
|
InStringLength = cchMultiByte;
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
|
@ -1058,22 +1056,15 @@ MultiByteToWideChar (
|
||||||
r = (PCHAR) lpMultiByteStr,
|
r = (PCHAR) lpMultiByteStr,
|
||||||
w = (PWCHAR) lpWideCharStr;
|
w = (PWCHAR) lpWideCharStr;
|
||||||
|
|
||||||
((*r) && (cchConverted < cchWideChar));
|
cchConverted < InStringLength;
|
||||||
|
|
||||||
r++,
|
r++,
|
||||||
|
w++,
|
||||||
cchConverted++
|
cchConverted++
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
*w = (WCHAR) *r;
|
*w = (WCHAR) *r;
|
||||||
}
|
}
|
||||||
/*
|
|
||||||
* Is the input string NULL terminated?
|
|
||||||
*/
|
|
||||||
if (TRUE == InIsNullTerminated)
|
|
||||||
{
|
|
||||||
*w = L'\0';
|
|
||||||
++cchConverted;
|
|
||||||
}
|
|
||||||
/*
|
/*
|
||||||
* Return how many characters we
|
* Return how many characters we
|
||||||
* wrote in the output buffer.
|
* wrote in the output buffer.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue