make sure the pointed to def has a name before attempting to print it

This commit is contained in:
Bill Currie 2003-09-02 04:52:54 +00:00
parent da4015d8d1
commit a1fa0b3feb

View file

@ -245,7 +245,7 @@ PR_ValueString (progs_t *pr, etype_t type, pr_type_t *val)
def = PR_Get_Local_Def (pr, ofs);
if (!def)
def = ED_GlobalAtOfs (pr, ofs);
if (def)
if (def && def->s_name)
snprintf (line, sizeof (line), "&%s",
PR_GetString (pr, def->s_name));
else