Module: wine Branch: master Commit: 8797fb52cf7ffb8a98473bf84b0290104bb0f759 URL: http://source.winehq.org/git/wine.git/?a=commit;h=8797fb52cf7ffb8a98473bf84b...
Author: Michael Stefaniuc mstefani@redhat.de Date: Mon Apr 19 10:29:49 2010 +0200
user32: Avoid using HIWORD on a string pointer.
---
dlls/user32/lstr.c | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/dlls/user32/lstr.c b/dlls/user32/lstr.c index 8fff22f..25a935a 100644 --- a/dlls/user32/lstr.c +++ b/dlls/user32/lstr.c @@ -230,7 +230,7 @@ BOOL WINAPI OemToCharW( LPCSTR s, LPWSTR d ) */ LPSTR WINAPI CharLowerA(LPSTR str) { - if (!HIWORD(str)) + if (IS_INTRESOURCE(str)) { char ch = LOWORD(str); CharLowerBuffA( &ch, 1 ); @@ -256,7 +256,7 @@ LPSTR WINAPI CharLowerA(LPSTR str) */ LPSTR WINAPI CharUpperA(LPSTR str) { - if (!HIWORD(str)) + if (IS_INTRESOURCE(str)) { char ch = LOWORD(str); CharUpperBuffA( &ch, 1 ); @@ -282,7 +282,7 @@ LPSTR WINAPI CharUpperA(LPSTR str) */ LPWSTR WINAPI CharLowerW(LPWSTR x) { - if (HIWORD(x)) return strlwrW(x); + if (!IS_INTRESOURCE(x)) return strlwrW(x); else return (LPWSTR)((UINT_PTR)tolowerW(LOWORD(x))); }
@@ -292,7 +292,7 @@ LPWSTR WINAPI CharLowerW(LPWSTR x) */ LPWSTR WINAPI CharUpperW(LPWSTR x) { - if (HIWORD(x)) return struprW(x); + if (!IS_INTRESOURCE(x)) return struprW(x); else return (LPWSTR)((UINT_PTR)toupperW(LOWORD(x))); }