From 43f162de057bdc195114e2e23aa970e043488562 Mon Sep 17 00:00:00 2001 From: Sergey Shorokhov Date: Tue, 6 Oct 2020 19:22:40 +0300 Subject: [PATCH] Add CVar sv_allowupload check on netchat validate --- rehlds/engine/net_chan.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rehlds/engine/net_chan.cpp b/rehlds/engine/net_chan.cpp index 957676a51..28dabdd61 100644 --- a/rehlds/engine/net_chan.cpp +++ b/rehlds/engine/net_chan.cpp @@ -649,7 +649,7 @@ qboolean Netchan_Validate(netchan_t *chan, qboolean *frag_message, unsigned int // total fragments should be <= MAX_FRAGMENTS and current fragment can't be > total fragments if (i == FRAG_NORMAL_STREAM && FRAG_GETCOUNT(fragid[i]) > MAX_NORMAL_FRAGMENTS) return FALSE; - if (i == FRAG_FILE_STREAM && FRAG_GETCOUNT(fragid[i]) > MAX_FILE_FRAGMENTS) + if (i == FRAG_FILE_STREAM && (!sv_allow_upload.value || FRAG_GETCOUNT(fragid[i]) > MAX_FILE_FRAGMENTS)) return FALSE; if (FRAG_GETID(fragid[i]) > FRAG_GETCOUNT(fragid[i])) return FALSE;