mirror of
https://github.com/reactos/reactos.git
synced 2024-11-20 06:15:26 +00:00
- Change MultiByteToWideChar to match windows behavior. Fix part 1 of ? for bug #3740.
svn path=/trunk/; revision=39301
This commit is contained in:
parent
edf41d63c7
commit
0c9316bd54
1 changed files with 9 additions and 9 deletions
|
@ -523,6 +523,14 @@ IntMultiByteToWideCharCP(UINT CodePage,
|
|||
if (WideCharCount == 0)
|
||||
return MultiByteCount;
|
||||
|
||||
/* Fill the WideCharString buffer with what will fit: Verified on WinXP */
|
||||
for (TempLength = (WideCharCount < MultiByteCount) ? WideCharCount : MultiByteCount;
|
||||
TempLength > 0;
|
||||
MultiByteString++, TempLength--)
|
||||
{
|
||||
*WideCharString++ = CodePageTable->MultiByteTable[(UCHAR)*MultiByteString];
|
||||
}
|
||||
|
||||
/* Adjust buffer size. Wine trick ;-) */
|
||||
if (WideCharCount < MultiByteCount)
|
||||
{
|
||||
|
@ -530,14 +538,6 @@ IntMultiByteToWideCharCP(UINT CodePage,
|
|||
SetLastError(ERROR_INSUFFICIENT_BUFFER);
|
||||
return 0;
|
||||
}
|
||||
|
||||
for (TempLength = MultiByteCount;
|
||||
TempLength > 0;
|
||||
MultiByteString++, TempLength--)
|
||||
{
|
||||
*WideCharString++ = CodePageTable->MultiByteTable[(UCHAR)*MultiByteString];
|
||||
}
|
||||
|
||||
return MultiByteCount;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue