From 8f5a9cfade82bf99f7e1323806d916f98cc7ee1c Mon Sep 17 00:00:00 2001 From: IntelOrca Date: Fri, 1 Jan 2016 20:46:13 +0000 Subject: [PATCH] fix issue caused by not copying filename string --- src/scenario.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/scenario.c b/src/scenario.c index 46c627731f..3c52ad321f 100644 --- a/src/scenario.c +++ b/src/scenario.c @@ -403,7 +403,7 @@ void scenario_success() } else { scenario_highscore_free(scenario->highscore); } - scenario->highscore->fileName = (utf8*)path_get_filename(scenario->path); + scenario->highscore->fileName = _strdup(path_get_filename(scenario->path)); scenario->highscore->name = NULL; scenario->highscore->company_value = companyValue;