1
0
mirror of https://github.com/wine-mirror/wine synced 2024-07-08 03:45:57 +00:00

winedbg: Don't use invalid address mode in exception prolog.

Removes a GCC 12.2 warning about printing NULL string.

Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
This commit is contained in:
Eric Pouech 2022-11-13 14:23:01 +01:00 committed by Alexandre Julliard
parent 5f29bcda6a
commit 41221452c8

View File

@ -153,7 +153,7 @@ static BOOL dbg_exception_prolog(BOOL is_debug, const EXCEPTION_RECORD* rec)
if (addr.Mode != dbg_curr_thread->addr_mode)
{
const char* name = NULL;
const char* name;
switch (addr.Mode)
{
@ -162,6 +162,7 @@ static BOOL dbg_exception_prolog(BOOL is_debug, const EXCEPTION_RECORD* rec)
case AddrModeReal: name = "vm86"; break;
case AddrModeFlat: name = dbg_curr_process->be_cpu->pointer_size == 4
? "32 bit" : "64 bit"; break;
default: return FALSE;
}
dbg_printf("In %s mode.\n", name);
dbg_curr_thread->addr_mode = addr.Mode;