Skip to content
Snippets Groups Projects
Commit 844968c4 authored by Alexandre Julliard's avatar Alexandre Julliard
Browse files

Added check for numeric ids and null pointers (thanks to Dimitrie).

parent 2ab76259
No related branches found
No related tags found
No related merge requests found
......@@ -187,6 +187,13 @@ static const char *default_dbgstr_an( const char *str, int n )
{
char *dst, *res;
if (!HIWORD(str))
{
if (!str) return "(null)";
res = get_tmp_space( 6 );
sprintf( res, "#%04x", LOWORD(str) );
return res;
}
if (n == -1) n = strlen(str);
if (n < 0) n = 0;
else if (n > 200) n = 200;
......@@ -231,6 +238,13 @@ static const char *default_dbgstr_wn( const WCHAR *str, int n )
{
char *dst, *res;
if (!HIWORD(str))
{
if (!str) return "(null)";
res = get_tmp_space( 6 );
sprintf( res, "#%04x", LOWORD(str) );
return res;
}
if (n == -1) n = strlenW(str);
if (n < 0) n = 0;
else if (n > 200) n = 200;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment