Page MenuHomeFeedback Tracker

PlayGameConfig does not protect against invalid resource names
Assigned, NormalPublic

Description

Passing ArmaReforgerScripted::PlayGameConfig() an invalid resource name will crash the game.

Details

Severity
Minor
Resolution
Open
Reproducibility
Always
Operating System
Windows 7
Category
General
Additional Information

This will not cause any issues in vanilla since this transition is never officially used.

While PlayGameConfig does check if an empty resource was passed, it does not check if the resource is actually a scenario config or even exists at all.

Adding a simple resource validity check would make the method safer to use for modders out of the box:

Resource r = Resource.Load(sResource);
if (!r || !r.IsValid()) return;

Optionally, another check could verify the resource is actually of class MissionHeader, e. g. using SCR_ConfigHelper.

Event Timeline

TilW created this task.Jul 15 2024, 1:05 PM
TilW edited Additional Information. (Show Details)Jul 15 2024, 1:14 PM
Geez changed the task status from New to Assigned.Jul 15 2024, 1:52 PM
TilW edited Additional Information. (Show Details)Jul 15 2024, 2:38 PM
TilW edited Additional Information. (Show Details)Jul 15 2024, 2:43 PM