1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-16 11:33:03 +01:00

Potential fix to #639.

The scenario name was missing its null to indicate the end of the string. This would cause scenarios to have odd fileNames that are compared against to compare a scenario against the scenario list
This commit is contained in:
duncanspumpkin
2015-10-09 22:11:28 +01:00
parent 33655afcf9
commit 59cdff7055

View File

@@ -236,7 +236,7 @@ int scenario_load_and_play_from_path(const char *path)
if (!scenario_load(path))
return 0;
int len = strnlen(path, MAX_PATH);
int len = strnlen(path, MAX_PATH) + 1;
strncpy(_scenarioPath, path, len);
if (len == MAX_PATH)
{