Fix #10438: [GS] Validate story page element type for ScriptStoryPage::NewElement (#11888)

Fixes a crash that happens if an invalid StoryPageElementType is passed to ScriptStoryPage::NewElement.

Adds an enforced precondition that tests the validity of StoryPageElementType.

Adds GSStoryPage::IsValidStoryPageElementType to the API.
This commit is contained in:
SamuXarick
2024-01-27 21:11:02 +00:00
committed by GitHub
parent 6d276698b6
commit 76f0f9e386
3 changed files with 15 additions and 0 deletions

View File

@@ -81,6 +81,7 @@
* \li GSGoal::SetDestination
* \li GSIndustry::GetProductionLevel
* \li GSIndustry::SetProductionLevel
* \li GSStoryPage::IsValidStoryPageElementType
*
* API removals:
* \li GSError::ERR_PRECONDITION_TOO_MANY_PARAMETERS, that error is never returned anymore.