user32: Suppress sign-extension through integer promotion.

This commit is contained in:
Andrew Talbot 2011-11-08 22:23:49 +00:00 committed by Alexandre Julliard
parent 0bed0f4ce6
commit 7e31baba31
1 changed files with 2 additions and 2 deletions

View File

@ -475,7 +475,7 @@ static INT wvsnprintfW( LPWSTR buffer, UINT maxlen, LPCWSTR spec, __ms_va_list a
case WPR_STRING:
{
LPCSTR ptr = argData.lpcstr_view;
for (i = 0; i < len; i++) *p++ = (WCHAR)*ptr++;
for (i = 0; i < len; i++) *p++ = (BYTE)*ptr++;
}
break;
case WPR_WSTRING:
@ -501,7 +501,7 @@ static INT wvsnprintfW( LPWSTR buffer, UINT maxlen, LPCWSTR spec, __ms_va_list a
/* fall through */
case WPR_UNSIGNED:
for (i = len; i < format.precision; i++, maxlen--) *p++ = '0';
for (i = sign; i < len; i++) *p++ = (WCHAR)number[i];
for (i = sign; i < len; i++) *p++ = (BYTE)number[i];
break;
case WPR_UNKNOWN:
continue;