Engine
Engine copied to clipboard
Cvar values set through cfg files include trailing comments
Describe the bug
If a cvar in a CFG file is followed by a comment, the cvar will be set to a string which includes the comment. For example:
sv_cheats 1 // Enable cheats on startup
will literally set the value of sv_cheats to 1 // Enable cheats on startup, rather than ignoring the comment (and preceding space) as expected.
For integer/float cvars everything still seems to work fine, but this causes a problem for cvars which take a string.
To Reproduce
- Put the command above in your autoexec
- Start the game
- Type
sv_cheatsinto the console but don't hit enter, the autocomplete will show the bug
Expected Behavior
It should ignore the comment.
Operating System
Tested on Windows 10
Still an issue

Still an issue on staging
Still an issue