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 7e87a76e1153dbf6551d0a44da71cf69d4d4be1a..5cdaa87471a3c55f3b4dd5a5b18e94494fd5b27d 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