From 2e8f780e03d7b1502b648d73b24787cadedcf610 Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Wed, 13 Feb 2002 05:49:24 +0000 Subject: [PATCH] return "" from PF_infokey when the client the key is being requested from has been dropped. This fixes a nasty crash at the end of a match in tf 2.8+ --- qw/source/sv_pr_cmds.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/qw/source/sv_pr_cmds.c b/qw/source/sv_pr_cmds.c index c75431473..58b38ad27 100644 --- a/qw/source/sv_pr_cmds.c +++ b/qw/source/sv_pr_cmds.c @@ -1255,7 +1255,8 @@ PF_infokey (progs_t *pr) if (e1 == 0) { if ((value = Info_ValueForKey (svs.info, key)) == NULL || !*value) value = Info_ValueForKey (localinfo, key); - } else if (e1 > 0 && e1 <= MAX_CLIENTS) { + } else if (e1 > 0 && e1 <= MAX_CLIENTS + && svs.clients[e1 - 1].userinfo) { if (!strcmp (key, "ip")) value = strcpy (ov,