fixed function to always return a string copy (and never a string constant)
authorHolger Schemel <info@artsoft.org>
Thu, 18 Apr 2019 23:04:35 +0000 (01:04 +0200)
committerHolger Schemel <info@artsoft.org>
Thu, 18 Apr 2019 23:04:35 +0000 (01:04 +0200)
src/libgame/setup.c

index 7e87a76..5cdaa87 100644 (file)
@@ -457,7 +457,7 @@ char *getProgramMainDataPath(char *command_filename, char *base_path)
 {
   // check if the program's main data base directory is configured
   if (!strEqual(base_path, "."))
-    return base_path;
+    return getStringCopy(base_path);
 
   /* if the program is configured to start from current directory (default),
      determine program package directory from program binary (some versions