Commit 0bed0f4c authored by Andrew Talbot's avatar Andrew Talbot Committed by Alexandre Julliard

shlwapi: Suppress sign-extension through integer promotion.

parent 65710af2
...@@ -488,7 +488,7 @@ INT WINAPI wvnsprintfW( LPWSTR buffer, INT maxlen, LPCWSTR spec, __ms_va_list ar ...@@ -488,7 +488,7 @@ INT WINAPI wvnsprintfW( LPWSTR buffer, INT maxlen, LPCWSTR spec, __ms_va_list ar
case WPR_STRING: case WPR_STRING:
{ {
LPCSTR ptr = argData.lpcstr_view; LPCSTR ptr = argData.lpcstr_view;
for (i = 0; i < len; i++) *p++ = (WCHAR)*ptr++; for (i = 0; i < len; i++) *p++ = (BYTE)*ptr++;
} }
break; break;
case WPR_WSTRING: case WPR_WSTRING:
...@@ -514,7 +514,7 @@ INT WINAPI wvnsprintfW( LPWSTR buffer, INT maxlen, LPCWSTR spec, __ms_va_list ar ...@@ -514,7 +514,7 @@ INT WINAPI wvnsprintfW( LPWSTR buffer, INT maxlen, LPCWSTR spec, __ms_va_list ar
/* fall through */ /* fall through */
case WPR_UNSIGNED: case WPR_UNSIGNED:
for (i = len; i < format.precision; i++, maxlen--) *p++ = '0'; 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; break;
case WPR_UNKNOWN: case WPR_UNKNOWN:
continue; continue;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment