Commit 5cc31118 authored by Michael Stefaniuc's avatar Michael Stefaniuc Committed by Alexandre Julliard

ntdll: Avoid using HIWORD on types that are 64bit on Win64.

parent 068cb129
...@@ -39,7 +39,8 @@ ...@@ -39,7 +39,8 @@
WINE_DEFAULT_DEBUG_CHANNEL(atom); WINE_DEFAULT_DEBUG_CHANNEL(atom);
#define MAX_ATOM_LEN 255 #define MAX_ATOM_LEN 255
#define IS_INTATOM(x) (((ULONG_PTR)(x) >> 16) == 0)
/****************************************************************** /******************************************************************
* is_integral_atom * is_integral_atom
...@@ -51,7 +52,7 @@ static NTSTATUS is_integral_atom( LPCWSTR atomstr, size_t len, RTL_ATOM* pAtom ) ...@@ -51,7 +52,7 @@ static NTSTATUS is_integral_atom( LPCWSTR atomstr, size_t len, RTL_ATOM* pAtom )
{ {
RTL_ATOM atom; RTL_ATOM atom;
if (HIWORD( atomstr )) if (!IS_INTATOM( atomstr ))
{ {
const WCHAR* ptr = atomstr; const WCHAR* ptr = atomstr;
if (!len) return STATUS_OBJECT_NAME_INVALID; if (!len) return STATUS_OBJECT_NAME_INVALID;
......
...@@ -52,6 +52,7 @@ struct relay_descr /* descriptor for a module */ ...@@ -52,6 +52,7 @@ struct relay_descr /* descriptor for a module */
}; };
#define RELAY_DESCR_MAGIC ((void *)0xdeb90001) #define RELAY_DESCR_MAGIC ((void *)0xdeb90001)
#define IS_INTARG(x) (((ULONG_PTR)(x) >> 16) == 0)
/* private data built at dll load time */ /* private data built at dll load time */
...@@ -303,7 +304,7 @@ static inline void RELAY_PrintArgs( const INT_PTR *args, int nb_args, unsigned i ...@@ -303,7 +304,7 @@ static inline void RELAY_PrintArgs( const INT_PTR *args, int nb_args, unsigned i
{ {
while (nb_args--) while (nb_args--)
{ {
if ((typemask & 3) && HIWORD(*args)) if ((typemask & 3) && !IS_INTARG(*args))
{ {
if (typemask & 2) if (typemask & 2)
DPRINTF( "%08lx %s", *args, debugstr_w((LPCWSTR)*args) ); DPRINTF( "%08lx %s", *args, debugstr_w((LPCWSTR)*args) );
...@@ -880,7 +881,7 @@ static void SNOOP_PrintArg(DWORD x) ...@@ -880,7 +881,7 @@ static void SNOOP_PrintArg(DWORD x)
int i,nostring; int i,nostring;
DPRINTF("%08x",x); DPRINTF("%08x",x);
if (!HIWORD(x) || TRACE_ON(seh)) return; /* trivial reject to avoid faults */ if (IS_INTARG(x) || TRACE_ON(seh)) return; /* trivial reject to avoid faults */
__TRY __TRY
{ {
LPBYTE s=(LPBYTE)x; LPBYTE s=(LPBYTE)x;
......
...@@ -49,6 +49,8 @@ WINE_DEFAULT_DEBUG_CHANNEL(resource); ...@@ -49,6 +49,8 @@ WINE_DEFAULT_DEBUG_CHANNEL(resource);
static LCID user_lcid, system_lcid; static LCID user_lcid, system_lcid;
static LANGID user_ui_language, system_ui_language; static LANGID user_ui_language, system_ui_language;
#define IS_INTRESOURCE(x) (((ULONG_PTR)(x) >> 16) == 0)
/********************************************************************** /**********************************************************************
* is_data_file_module * is_data_file_module
* *
...@@ -142,7 +144,7 @@ static const IMAGE_RESOURCE_DIRECTORY *find_entry_by_name( const IMAGE_RESOURCE_ ...@@ -142,7 +144,7 @@ static const IMAGE_RESOURCE_DIRECTORY *find_entry_by_name( const IMAGE_RESOURCE_
const IMAGE_RESOURCE_DIR_STRING_U *str; const IMAGE_RESOURCE_DIR_STRING_U *str;
int min, max, res, pos, namelen; int min, max, res, pos, namelen;
if (!HIWORD(name)) return find_entry_by_id( dir, LOWORD(name), root, want_dir ); if (IS_INTRESOURCE(name)) return find_entry_by_id( dir, LOWORD(name), root, want_dir );
entry = (const IMAGE_RESOURCE_DIRECTORY_ENTRY *)(dir + 1); entry = (const IMAGE_RESOURCE_DIRECTORY_ENTRY *)(dir + 1);
namelen = strlenW(name); namelen = strlenW(name);
min = 0; min = 0;
......
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