Commit 8797fb52 authored by Michael Stefaniuc's avatar Michael Stefaniuc Committed by Alexandre Julliard

user32: Avoid using HIWORD on a string pointer.

parent 9dd206d2
...@@ -230,7 +230,7 @@ BOOL WINAPI OemToCharW( LPCSTR s, LPWSTR d ) ...@@ -230,7 +230,7 @@ BOOL WINAPI OemToCharW( LPCSTR s, LPWSTR d )
*/ */
LPSTR WINAPI CharLowerA(LPSTR str) LPSTR WINAPI CharLowerA(LPSTR str)
{ {
if (!HIWORD(str)) if (IS_INTRESOURCE(str))
{ {
char ch = LOWORD(str); char ch = LOWORD(str);
CharLowerBuffA( &ch, 1 ); CharLowerBuffA( &ch, 1 );
...@@ -256,7 +256,7 @@ LPSTR WINAPI CharLowerA(LPSTR str) ...@@ -256,7 +256,7 @@ LPSTR WINAPI CharLowerA(LPSTR str)
*/ */
LPSTR WINAPI CharUpperA(LPSTR str) LPSTR WINAPI CharUpperA(LPSTR str)
{ {
if (!HIWORD(str)) if (IS_INTRESOURCE(str))
{ {
char ch = LOWORD(str); char ch = LOWORD(str);
CharUpperBuffA( &ch, 1 ); CharUpperBuffA( &ch, 1 );
...@@ -282,7 +282,7 @@ LPSTR WINAPI CharUpperA(LPSTR str) ...@@ -282,7 +282,7 @@ LPSTR WINAPI CharUpperA(LPSTR str)
*/ */
LPWSTR WINAPI CharLowerW(LPWSTR x) 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))); else return (LPWSTR)((UINT_PTR)tolowerW(LOWORD(x)));
} }
...@@ -292,7 +292,7 @@ LPWSTR WINAPI CharLowerW(LPWSTR x) ...@@ -292,7 +292,7 @@ LPWSTR WINAPI CharLowerW(LPWSTR x)
*/ */
LPWSTR WINAPI CharUpperW(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))); else return (LPWSTR)((UINT_PTR)toupperW(LOWORD(x)));
} }
......
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