Commit daab2c11 authored by Alexandre Julliard's avatar Alexandre Julliard

dbghelp: Fix an uninitialized return value.

parent 49a8bb0a
......@@ -87,11 +87,11 @@ static unsigned source_find(const char* name)
*/
unsigned source_new(struct module* module, const char* base, const char* name)
{
unsigned ret;
unsigned ret = -1;
const char* full;
char* tmp = NULL;
if (!name) return (unsigned)-1;
if (!name) return ret;
if (!base || *name == '/')
full = name;
else
......@@ -99,7 +99,7 @@ unsigned source_new(struct module* module, const char* base, const char* name)
unsigned bsz = strlen(base);
tmp = HeapAlloc(GetProcessHeap(), 0, bsz + 1 + strlen(name) + 1);
if (!tmp) return (unsigned)-1;
if (!tmp) return ret;
full = tmp;
strcpy(tmp, base);
if (tmp[bsz - 1] != '/') tmp[bsz++] = '/';
......
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