[PATCH] winedump: Make print_longlong() work on 64-bit.
Henri Verbeet
hverbeet at codeweavers.com
Thu May 20 06:53:47 CDT 2021
In particular, when long is a 64-bit type, the upper 32 bits would previously
be printed twice.
Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
---
tools/winedump/pe.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/winedump/pe.c b/tools/winedump/pe.c
index aa679103e59..161ba3b248e 100644
--- a/tools/winedump/pe.c
+++ b/tools/winedump/pe.c
@@ -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);
--
2.20.1
More information about the wine-devel
mailing list