mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-01-18 23:11:38 +00:00
Do not do any contents evaluation if not printing contents.
Fixes a segfault when tracing progs caused by the recent entity number change.
This commit is contained in:
parent
8691a2fbd1
commit
d73b5045d8
1 changed files with 2 additions and 3 deletions
|
@ -717,7 +717,7 @@ global_string (progs_t *pr, pr_int_t ofs, etype_t type, int contents)
|
|||
|
||||
def = def_string (pr, ofs, line);
|
||||
|
||||
if (def || type != ev_void) {
|
||||
if (contents && (def || type != ev_void)) {
|
||||
const char *oi = "";
|
||||
if (def) {
|
||||
if (type == ev_void)
|
||||
|
@ -734,8 +734,7 @@ global_string (progs_t *pr, pr_int_t ofs, etype_t type, int contents)
|
|||
if (strequal(line->str, "IMMEDIATE") || strequal(line->str, ".imm")) {
|
||||
dsprintf (line, "%s", s);
|
||||
} else {
|
||||
if (contents)
|
||||
dasprintf (line, "%s(%s)", oi, s);
|
||||
dasprintf (line, "%s(%s)", oi, s);
|
||||
}
|
||||
}
|
||||
return line->str;
|
||||
|
|
Loading…
Reference in a new issue