winedbg: In print_hex, don't print bits not included in size.

Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Eric Pouech 2021-12-01 15:30:53 +01:00 committed by Alexandre Julliard
parent d81e757075
commit 24eb754af6
1 changed files with 2 additions and 1 deletions

View File

@ -337,7 +337,8 @@ static void dbg_print_hex(DWORD size, ULONGLONG sv)
if (!sv)
dbg_printf("0");
else
dbg_printf("%#I64x", sv);
/* clear unneeded high bits, esp. sign extension */
dbg_printf("%#I64x", sv & (~0LLU >> (64 - 8 * size)));
}
static void print_typed_basic(const struct dbg_lvalue* lvalue)