[PATCH 17/18] programs/winedbg: don't hard code sizes
Eric Pouech
eric.pouech at gmail.com
Fri Dec 3 09:58:39 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 fd117ebea9c..e2466f93d4f 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