Skip to content

improvement: bump CVAR desc limit from 256 to 8192 - #419

Open
WofWca wants to merge 1 commit into
ec-:mainfrom
WofWca:increase-cvar-desc
Open

improvement: bump CVAR desc limit from 256 to 8192#419
WofWca wants to merge 1 commit into
ec-:mainfrom
WofWca:increase-cvar-desc

Conversation

@WofWca

@WofWca WofWca commented Jul 24, 2026

Copy link
Copy Markdown

256 is quite short, and we bump our head against it already
in the baseq3a mod:
https://github.com/ec-/baseq3a/pull/84.

Note that this does not increase memory usage
if no CVAR description is longer than 256.

(side note: maybe it'd be better
if we didn't copy the string at all and just used the original pointer,
because CVAR descriptions are usually string literals
which don't ever change).

256 is quite short, and we bump our head against it already
in the baseq3a mod:
https://github.com/ec-/baseq3a/pull/84.

Note that this does not increase memory usage
if no CVAR description is longer than 256.

(side note: maybe it'd be better
if we didn't copy the string at all and just used the original pointer,
because CVAR descriptions are usually string literals
which don't ever change).
@ec-

ec- commented Jul 27, 2026

Copy link
Copy Markdown
Owner

This is fine, thank you, but reduce limit to 1024/MAX_STRING_CHARS or similar, I wouldn't accept 1k+ descriptions at all to be honest, it must be clear and brief by design

@WofWca

WofWca commented Jul 27, 2026

Copy link
Copy Markdown
Author

I wouldn't accept 1k+ descriptions at all to be honest, it must be clear and brief by design

As a mod developer I agree that 1k+ is probably too much, but here we're talking about an engine. If there is some crazy mod that for whatever reason needs more, why not let them? Especially that it costs us nothing - we use only as much memory as the description needs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants