[PATCH 17/17] programs/winedbg: don't hard code sizes

Eric Pouech eric.pouech at gmail.com
Tue Dec 7 11:46:56 CST 2021


Signed-off-by: Eric Pouech <eric.pouech at gmail.com>

---
 programs/winedbg/memory.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/programs/winedbg/memory.c b/programs/winedbg/memory.c
index 4708dcdd1b1..f6d2ef6bee2 100644
--- a/programs/winedbg/memory.c
+++ b/programs/winedbg/memory.c
@@ -474,7 +474,7 @@ static void dbg_print_hex(DWORD size, dbg_lgint_t sv)
         dbg_printf("0");
     else
         /* clear unneeded high bits, esp. sign extension */
-        dbg_printf("%#I64x", sv & (~0LLU >> (64 - 8 * size)));
+        dbg_printf("%#I64x", sv & (~(dbg_lguint_t)0 >> (8 * (sizeof(dbg_lgint_t) - size))));
 }
 
 static void print_typed_basic(const struct dbg_lvalue* lvalue)




More information about the wine-devel mailing list