From b7bfa5a5c70b289f9bf0454a9d60c680c5361164 Mon Sep 17 00:00:00 2001 From: Sally Coolatta Date: Tue, 27 Sep 2022 16:16:04 -0400 Subject: [PATCH] Don't try cheater warning if NULL netvar --- src/command.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/command.c b/src/command.c index d5f184493..0015bcf1c 100644 --- a/src/command.c +++ b/src/command.c @@ -1773,11 +1773,13 @@ static void Got_NetVar(UINT8 **p, INT32 playernum) cvar = ReadNetVar(p, &svalue, &stealth); if (cvar) + { Setvalue(cvar, svalue, stealth); - if ((cvar->flags & CV_CHEAT) && stricmp(cvar->string, cvar->defaultvalue) != 0) // use cvar->string to compare what it is now - { - CV_CheaterWarning(playernum, va("%s %s", cvar->name, svalue)); // but use svalue to show what they inputted + if ((cvar->flags & CV_CHEAT) && stricmp(cvar->string, cvar->defaultvalue) != 0) // use cvar->string to compare what it is now + { + CV_CheaterWarning(playernum, va("%s %s", cvar->name, svalue)); // but use svalue to show what they inputted + } } }