Skip to content

Fix GetSystemCMD concatenating flags without spaces#397

Merged
Shivansps merged 2 commits into
KnossosNET:mainfrom
Goober5000:fix/cmd_flags
May 10, 2026
Merged

Fix GetSystemCMD concatenating flags without spaces#397
Shivansps merged 2 commits into
KnossosNET:mainfrom
Goober5000:fix/cmd_flags

Conversation

@Goober5000
Copy link
Copy Markdown
Contributor

Every flag appended in GetSystemCMD() was missing a leading space, producing malformed output like "-enable_shadows-shadow_quality 2-aa" instead of "-enable_shadows -shadow_quality 2 -aa". FSO would receive all system flags merged into one unparseable token.

The PlayMod call path happened to work by accident because it splits the result on '-' before passing it to CmdLineBuilder, but the output was wrong by contract and would break any caller that used it directly.

Every flag appended in GetSystemCMD() was missing a leading space,
producing malformed output like "-enable_shadows-shadow_quality 2-aa"
instead of "-enable_shadows -shadow_quality 2 -aa". FSO would receive
all system flags merged into one unparseable token.

The PlayMod call path happened to work by accident because it splits
the result on '-' before passing it to CmdLineBuilder, but the output
was wrong by contract and would break any caller that used it directly.
Copy link
Copy Markdown
Member

@Shivansps Shivansps left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Im going to aprove it but im a bit concerned that it may create problems while doing comparisons. I think it will not but, we need to check that the cmd priority still work for these cmdline arguments

@Goober5000 Goober5000 marked this pull request as draft May 8, 2026 00:37
@Goober5000 Goober5000 marked this pull request as ready for review May 8, 2026 05:10
@Shivansps Shivansps merged commit 977fd56 into KnossosNET:main May 10, 2026
@Goober5000 Goober5000 deleted the fix/cmd_flags branch May 10, 2026 21:38
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