From 2bef810ce66fc10dbf6db1b6875cdc72142bfe5e Mon Sep 17 00:00:00 2001 From: ds Date: Wed, 14 Oct 2020 20:08:06 +0300 Subject: [PATCH] add: split long string into smaller pieces. --- src/engine.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/engine.cpp b/src/engine.cpp index 1130bfe..f28a643 100644 --- a/src/engine.cpp +++ b/src/engine.cpp @@ -440,7 +440,7 @@ void Game::sendClientMessage (bool console, edict_t *ent, StringRef message) { }; // do not excess limit - constexpr size_t maxSendLength = 187; + constexpr size_t maxSendLength = 125; // split up the string into chunks if needed (maybe check if it's multibyte?) if (buffer.length () > maxSendLength) { @@ -459,7 +459,7 @@ void Game::sendServerMessage (StringRef message) { // helper to sending the client message // do not excess limit - constexpr size_t maxSendLength = 250; + constexpr size_t maxSendLength = 175; // split up the string into chunks if needed (maybe check if it's multibyte?) if (message.length () > maxSendLength) {