From: Holger Schemel Date: Fri, 6 Jan 2017 18:13:28 +0000 (+0100) Subject: fixed determining program main data path for Mac OS X X-Git-Tag: 4.0.0.1~5 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=73d5033080f93ad34a3e5aee7e8abd7aba8e17a9;p=rocksndiamonds.git fixed determining program main data path for Mac OS X --- diff --git a/src/libgame/misc.c b/src/libgame/misc.c index 559fd385..bf40ca9b 100644 --- a/src/libgame/misc.c +++ b/src/libgame/misc.c @@ -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;