Andrew Talbot : shlwapi: Suppress sign-extension through integer promotion.

Alexandre Julliard julliard at winehq.org
Wed Nov 9 13:29:41 CST 2011


Module: wine
Branch: master
Commit: 0bed0f4ce6c7f0a646bf756ed5d9abc16aaf775b
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=0bed0f4ce6c7f0a646bf756ed5d9abc16aaf775b

Author: Andrew Talbot <andrew.talbot at talbotville.com>
Date:   Tue Nov  8 22:23:45 2011 +0000

shlwapi: Suppress sign-extension through integer promotion.

---

 dlls/shlwapi/wsprintf.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/dlls/shlwapi/wsprintf.c b/dlls/shlwapi/wsprintf.c
index 1093393..56eea41 100644
--- a/dlls/shlwapi/wsprintf.c
+++ b/dlls/shlwapi/wsprintf.c
@@ -488,7 +488,7 @@ INT WINAPI wvnsprintfW( LPWSTR buffer, INT maxlen, LPCWSTR spec, __ms_va_list ar
         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:
@@ -514,7 +514,7 @@ INT WINAPI wvnsprintfW( LPWSTR buffer, INT maxlen, LPCWSTR spec, __ms_va_list ar
             /* 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;




More information about the wine-cvs mailing list