From 0a2498d074c03609e8ca19ca361469e947566dde Mon Sep 17 00:00:00 2001 From: Shugo Kawamura Date: Wed, 2 Aug 2023 02:44:41 +0000 Subject: [PATCH 1/3] Increase MAX_CVAR_LENGTH(1025) --- scripting/get5/util.sp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripting/get5/util.sp b/scripting/get5/util.sp index 8238d03a..3dbfbd1b 100644 --- a/scripting/get5/util.sp +++ b/scripting/get5/util.sp @@ -3,7 +3,7 @@ #define LATEST_VERSION_URL "https://raw.githubusercontent.com/splewis/get5/master/scripting/get5/version.sp" #define GET5_GITHUB_PAGE "splewis.github.io/get5" #define DEFAULT_CONFIG_KEY "default" -#define MAX_CVAR_LENGTH 513 // 512 + 1 for buffers +#define MAX_CVAR_LENGTH 1025 // 1024 + 1 for buffers #define MAX_INTEGER_STRING_LENGTH 16 #define MAX_FLOAT_STRING_LENGTH 32 #define SERVER_ID_LENGTH 65 From 14e5ceafbd2c5bbf41896dd861d3fbb4d1ce629e Mon Sep 17 00:00:00 2001 From: Shugo Kawamura Date: Fri, 4 Aug 2023 21:09:30 +0900 Subject: [PATCH 2/3] Update document --- documentation/docs/configuration.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/documentation/docs/configuration.md b/documentation/docs/configuration.md index cdee535d..dc9da7a1 100644 --- a/documentation/docs/configuration.md +++ b/documentation/docs/configuration.md @@ -14,9 +14,9 @@ cfg/sourcemod/get5.cfg You can either set the below parameters in that file, or in the `cvars` section of a match config. As mentioned in the explanation of the [match schema](../match_schema), that section will override all other settings. -!!! warning "512 and no more" +!!! warning "1024 and no more" - Note that the maximum length of any config parameter is *less than* 512 characters. Depending on where these + Note that the maximum length of any config parameter is *less than* 1024 characters. Depending on where these parameters are set, being close to this limit may cause problems. This applies to things like URLs or HTTP headers, so beware of long strings in these cases. From bb85d8cad8932a6dde6c7d1cb1f5bf8fe00fdbac Mon Sep 17 00:00:00 2001 From: Shugo Kawamura Date: Fri, 4 Aug 2023 21:09:43 +0900 Subject: [PATCH 3/3] Update restore cvar max length --- scripting/include/restorecvars.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripting/include/restorecvars.inc b/scripting/include/restorecvars.inc index 67d23c41..ef29a081 100644 --- a/scripting/include/restorecvars.inc +++ b/scripting/include/restorecvars.inc @@ -1,5 +1,5 @@ #define CVAR_NAME_MAX_LENGTH 128 -#define CVAR_VALUE_MAX_LENGTH 513 +#define CVAR_VALUE_MAX_LENGTH 1025 // Returns a cvar Handle that can be used to restore cvars. stock Handle SaveCvars(ArrayList cvarNames) {