Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Increase MAX_CVAR_LENGTH(1025)(#1034) #1035

Open
wants to merge 3 commits into
base: development
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions documentation/docs/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
2 changes: 1 addition & 1 deletion scripting/get5/util.sp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion scripting/include/restorecvars.inc
Original file line number Diff line number Diff line change
@@ -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) {
Expand Down