winedump: Make print_longlong() work on 64-bit.

In particular, when long is a 64-bit type, the upper 32 bits would previously
be printed twice.

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Henri Verbeet 2021-05-20 13:53:47 +02:00 committed by Alexandre Julliard
parent caa039466b
commit 4ae9f39911
1 changed files with 1 additions and 1 deletions

View File

@ -182,7 +182,7 @@ static inline void print_dword(const char *title, DWORD value)
static inline void print_longlong(const char *title, ULONGLONG value)
{
printf(" %-34s 0x", title);
if(value >> 32)
if (sizeof(value) > sizeof(unsigned long) && value >> 32)
printf("%lx%08lx\n", (unsigned long)(value >> 32), (unsigned long)value);
else
printf("%lx\n", (unsigned long)value);