mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-03-22 10:21:21 +00:00
[gamecode] Print only entity address when no edicts
If the edicts pointer is null, it's not possible to convert the entity address to an index.
This commit is contained in:
parent
f738639d68
commit
a069fad41e
1 changed files with 6 additions and 2 deletions
|
@ -1019,9 +1019,13 @@ pr_debug_entity_view (qfot_type_t *type, pr_type_t *value, void *_data)
|
|||
__auto_type data = (pr_debug_data_t *) _data;
|
||||
progs_t *pr = data->pr;
|
||||
dstring_t *dstr = data->dstr;
|
||||
edict_t *edict = PROG_TO_EDICT (pr, value->entity_var);
|
||||
|
||||
dasprintf (dstr, "entity %d", NUM_FOR_BAD_EDICT (pr, edict));
|
||||
if (pr->edicts) {
|
||||
edict_t *edict = PROG_TO_EDICT (pr, value->entity_var);
|
||||
dasprintf (dstr, "entity %d", NUM_FOR_BAD_EDICT (pr, edict));
|
||||
} else {
|
||||
dasprintf (dstr, "entity [%x]",value->entity_var);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
Loading…
Reference in a new issue