user32: Don't use HIWORD() on a HINSTANCE.
authorMichael Stefaniuc <mstefani@redhat.de>
Thu, 11 Feb 2010 14:26:23 +0000 (15:26 +0100)
committerAlexandre Julliard <julliard@winehq.org>
Thu, 11 Feb 2010 16:33:50 +0000 (17:33 +0100)
dlls/user32/cursoricon.c

index d4cdde4342b9d6f52ec942e9d2781309bb35e017..a003cb06e930c8cfedbd8ec570c4387f61fb3404 100644 (file)
@@ -1258,7 +1258,7 @@ static HICON CURSORICON_Load(HINSTANCE hInstance, LPCWSTR name,
     if (!hInstance) hInstance = user32_module;  /* Load OEM cursor/icon */
 
     /* don't cache 16-bit instances (FIXME: should never get 16-bit instances in the first place) */
-    if (!HIWORD( hInstance )) loadflags &= ~LR_SHARED;
+    if ((ULONG_PTR)hInstance >> 16 == 0) loadflags &= ~LR_SHARED;
 
     /* Get directory resource ID */