From 8e21e4a821b7e4a5fb7ac4411841c806062a8f33 Mon Sep 17 00:00:00 2001 From: Giferns <47265743+Giferns@users.noreply.github.com> Date: Thu, 11 Jul 2024 13:00:20 +0300 Subject: [PATCH] Add `sv_allowupload` check on netchan validate https://github.com/dreamstalker/rehlds/pull/788 --- 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 b4b75e9c..cefb6371 100644 --- a/rehlds/engine/net_chan.cpp +++ b/rehlds/engine/net_chan.cpp @@ -655,7 +655,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;