Skip to content
Snippets Groups Projects
Commit 379333e3 authored by Francisco Casas's avatar Francisco Casas Committed by Alexandre Julliard
Browse files

gdi32: Do not sign extend 64-bit gdi handles.


Testing on Windows shows typically handles are not sign extended,
however sometimes they are. It's not clear what triggers the change
in behaviour.

Signed-off-by: default avatarFrancisco Casas <fcasas@codeweavers.com>
Signed-off-by: default avatarHuw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard's avatarAlexandre Julliard <julliard@winehq.org>
parent d85b700d
No related branches found
No related tags found
No related merge requests found
......@@ -102,7 +102,7 @@ static inline GDI_HANDLE_ENTRY *handle_entry( HGDIOBJ handle )
static HGDIOBJ entry_to_handle( GDI_HANDLE_ENTRY *entry )
{
unsigned int idx = entry - get_gdi_shared()->Handles;
return LongToHandle( idx | (entry->Unique << NTGDI_HANDLE_TYPE_SHIFT) );
return ULongToHandle( idx | (entry->Unique << NTGDI_HANDLE_TYPE_SHIFT) );
}
static DWORD get_object_type( HGDIOBJ obj )
......
......@@ -55,7 +55,7 @@ const struct user_callbacks *user_callbacks = NULL;
static inline HGDIOBJ entry_to_handle( GDI_HANDLE_ENTRY *entry )
{
unsigned int idx = entry - gdi_shared->Handles;
return LongToHandle( idx | (entry->Unique << NTGDI_HANDLE_TYPE_SHIFT) );
return ULongToHandle( idx | (entry->Unique << NTGDI_HANDLE_TYPE_SHIFT) );
}
static inline GDI_HANDLE_ENTRY *handle_entry( HGDIOBJ handle )
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment