StrataSource / Engine

Issue tracker for Strata Source
47 stars 2 forks source link

Cvar values set through cfg files include trailing comments #258

Open vrad-exe opened 2 years ago

vrad-exe commented 2 years ago

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

  1. Put the command above in your autoexec
  2. Start the game
  3. Type sv_cheats into 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

vrad-exe commented 1 year ago

Still an issue image

vrad-exe commented 1 year ago

Still an issue on staging image

vrad-exe commented 3 months ago

Still an issue