Skip to content

optional_string_fred fixes#7280

Open
Goober5000 wants to merge 1 commit intoscp-fs2open:masterfrom
Goober5000:campaign_optional_string_fred
Open

optional_string_fred fixes#7280
Goober5000 wants to merge 1 commit intoscp-fs2open:masterfrom
Goober5000:campaign_optional_string_fred

Conversation

@Goober5000
Copy link
Contributor

@Goober5000 Goober5000 commented Mar 12, 2026

Not using the return value from optional_string_fred triggers Coverity warnings, but it turns out those "consume token" blocks aren't actually needed.

While we're at it, make the token parsing a little more robust in campaignsave.cpp and clean up the newline behavior.

Tested with FreeSpace2, Templar, BP: Chanticleer, Inferno Nostos, Scroll, and the BtA campaigns.

Not using the return value from `optional_string_fred` triggers Coverity warnings, but it turns out those "consume token" blocks aren't actually needed.

While we're at it, make the token parsing a little more robust in campaignsave.cpp and clean up the newline behavior.
@Goober5000 Goober5000 added coverity An issue flagged by Coverity cleanup A modification or rewrite of code to make it more understandable or easier to maintain. labels Mar 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cleanup A modification or rewrite of code to make it more understandable or easier to maintain. coverity An issue flagged by Coverity

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant