mirror of
https://github.com/reactos/reactos.git
synced 2025-06-24 20:29:47 +00:00
[KERNEL32]
- don't garble the output with invalid data in WideCharToUtf7 - fixes whopping 65536 failed tests and as a result Testman shouldn't choke on kernel32:codepage anymore svn path=/trunk/; revision=66742
This commit is contained in:
parent
c05c34ec78
commit
d754c64cfd
1 changed files with 2 additions and 2 deletions
|
@ -1654,12 +1654,12 @@ static INT WideCharToUtf7(LPCWSTR pszWide, INT cchWide, LPSTR pszUtf7, INT cchUt
|
|||
}
|
||||
*pszUtf7++ = base64[wsz[0] >> 10];
|
||||
*pszUtf7++ = base64[(wsz[0] >> 4) & 0x3F];
|
||||
*pszUtf7++ = base64[(wsz[0] << 2 | wsz[1] >> 14) & 0x3F];
|
||||
*pszUtf7++ = base64[(wsz[0] << 2 | (n >= 2 ? wsz[1] >> 14 : 0)) & 0x3F];
|
||||
if (n >= 2)
|
||||
{
|
||||
*pszUtf7++ = base64[(wsz[1] >> 8) & 0x3F];
|
||||
*pszUtf7++ = base64[(wsz[1] >> 2) & 0x3F];
|
||||
*pszUtf7++ = base64[(wsz[1] << 4 | wsz[2] >> 12) & 0x3F];
|
||||
*pszUtf7++ = base64[(wsz[1] << 4 | (n >= 3 ? wsz[2] >> 12 : 0)) & 0x3F];
|
||||
if (n >= 3)
|
||||
{
|
||||
*pszUtf7++ = base64[(wsz[2] >> 6) & 0x3F];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue