mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-26 22:31:05 +00:00
make sure the string is valid before attempting to print it
This commit is contained in:
parent
44285ba5de
commit
5c3892cbb2
1 changed files with 5 additions and 2 deletions
|
@ -200,8 +200,11 @@ PR_ValueString (progs_t *pr, etype_t type, pr_type_t *val)
|
|||
|
||||
switch (type) {
|
||||
case ev_string:
|
||||
snprintf (line, sizeof (line), "%s",
|
||||
PR_GetString (pr, val->string_var));
|
||||
if (PR_StringValid (pr, val->string_var))
|
||||
snprintf (line, sizeof (line), "%s",
|
||||
PR_GetString (pr, val->string_var));
|
||||
else
|
||||
strcpy (line, "*** invalid ***");
|
||||
break;
|
||||
case ev_entity:
|
||||
snprintf (line, sizeof (line), "entity %i",
|
||||
|
|
Loading…
Reference in a new issue