Module: wine Branch: master Commit: 4ae9f399112a56777dfb343450450ba3d5554fbb URL: https://source.winehq.org/git/wine.git/?a=commit;h=4ae9f399112a56777dfb34345... Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Thu May 20 13:53:47 2021 +0200 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(a)codeweavers.com> Signed-off-by: Alexandre Julliard <julliard(a)winehq.org> --- 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);