fixed determining program main data path for Mac OS X
authorHolger Schemel <info@artsoft.org>
Fri, 6 Jan 2017 18:13:28 +0000 (19:13 +0100)
committerHolger Schemel <info@artsoft.org>
Fri, 6 Jan 2017 18:13:28 +0000 (19:13 +0100)
src/libgame/misc.c

index 559fd3859a69b443e9a95267d269c92118780c5c..bf40ca9bdfac02fbbf4c6addf2c3dd3b87b2186e 100644 (file)
@@ -701,6 +701,10 @@ static char *getProgramMainDataPath()
   // cut trailing path separator from path (but not if path is root directory)
   if (strSuffix(main_data_path, "/") && !strEqual(main_data_path, "/"))
     main_data_path[strlen(main_data_path) - 1] = '\0';
+
+  // replace empty path with current directory
+  if (strEqual(main_data_path, ""))
+    main_data_path = ".";
 #endif
 
   return main_data_path;