Skip to content

send-message-list arg-count forgiveness, plus better error checking - #7670

Open
Goober5000 wants to merge 1 commit into
scp-fs2open:masterfrom
Goober5000:fix/msg_arg_count
Open

send-message-list arg-count forgiveness, plus better error checking#7670
Goober5000 wants to merge 1 commit into
scp-fs2open:masterfrom
Goober5000:fix/msg_arg_count

Conversation

@Goober5000

Copy link
Copy Markdown
Contributor

Due to a long-standing bug, the groups-of-4 argument count check for send-message-list and send-message-chain never actually worked, so missions through 25.0 could includes sexps with truncated argument lists that recovered gracefully at runtime. Now that the check works, don't punish those missions: introduce SEXP_CHECK_BAD_ARG_COUNT_BENIGN, which warns but does not prevent the mission from loading.

To make sexp tree validation more robust, check_sexp_syntax now defers recoverable errors rather than returning them immediately; otherwise a recoverable error could mask a fatal error deeper in the tree.

Also fix a stale-variable bug in FRED's fred_check_sexp that could produce a bogus empty dialog.

@Goober5000 Goober5000 added cleanup A modification or rewrite of code to make it more understandable or easier to maintain. sexps A feature or issue related to SEXPs labels Jul 30, 2026
Due to a long-standing bug, the groups-of-4 argument count check for
send-message-list and send-message-chain never actually worked, so
missions through 25.0 could includes sexps with truncated argument lists
that recovered gracefully at runtime.  Now that the check works, don't
punish those missions: introduce SEXP_CHECK_BAD_ARG_COUNT_BENIGN, which
warns but does not prevent the mission from loading.

To make sexp tree validation more robust, check_sexp_syntax now defers
recoverable errors rather than returning them immediately; otherwise
a recoverable error could mask a fatal error deeper in the tree.

Also fix a stale-variable bug in FRED's fred_check_sexp that could
produce a bogus empty dialog.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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. sexps A feature or issue related to SEXPs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant