Commit f50695c7 authored by Eric Pouech's avatar Eric Pouech Committed by Alexandre Julliard

Handle error conditions for print.

parent 7eba5c5c
...@@ -347,10 +347,13 @@ static void print_typed_basic(const struct dbg_lvalue* lvalue) ...@@ -347,10 +347,13 @@ static void print_typed_basic(const struct dbg_lvalue* lvalue)
{ {
char buffer[1024]; char buffer[1024];
memory_get_string(dbg_curr_process, val_ptr, if (!val_ptr) dbg_printf("0x0");
else if (memory_get_string(dbg_curr_process, val_ptr,
lvalue->cookie == DLV_TARGET, lvalue->cookie == DLV_TARGET,
size == 2, buffer, sizeof(buffer)); size == 2, buffer, sizeof(buffer)))
dbg_printf("\"%s\"", buffer); dbg_printf("\"%s\"", buffer);
else
dbg_printf("*** invalid address %p ***", val_ptr);
} }
else dbg_printf("%p", val_ptr); else dbg_printf("%p", val_ptr);
break; break;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment