projects
/
rocksndiamonds.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
58edf10
)
removed reference to (potentially undefined) global variable from function
author
Holger Schemel
<info@artsoft.org>
Tue, 7 Nov 2017 22:08:54 +0000
(23:08 +0100)
committer
Holger Schemel
<info@artsoft.org>
Fri, 23 Mar 2018 22:21:16 +0000
(23:21 +0100)
src/libgame/misc.c
patch
|
blob
|
history
diff --git
a/src/libgame/misc.c
b/src/libgame/misc.c
index b1d0d96bda910307bc80259b8f741cea0c021632..2116630707fc7bcb423a8cf51a4844a52cadc638 100644
(file)
--- a/
src/libgame/misc.c
+++ b/
src/libgame/misc.c
@@
-696,9
+696,9
@@
char *getBasePath(char *filename)
return basepath;
}
return basepath;
}
-static char *getProgramMainDataPath()
+static char *getProgramMainDataPath(
char *command_filename
)
{
{
- char *main_data_path = get
StringCopy(program.command_basepath
);
+ char *main_data_path = get
BasePath(command_filename
);
#if defined(PLATFORM_MACOSX)
if (strSuffix(main_data_path, MAC_APP_BINARY_SUBDIR))
#if defined(PLATFORM_MACOSX)
if (strSuffix(main_data_path, MAC_APP_BINARY_SUBDIR))
@@
-955,9
+955,9
@@
void GetOptions(int argc, char *argv[],
set the current working directory to the program package directory) */
if (strEqual(ro_base_path, "."))
set the current working directory to the program package directory) */
if (strEqual(ro_base_path, "."))
- ro_base_path = getProgramMainDataPath();
+ ro_base_path = getProgramMainDataPath(
argv[0]
);
if (strEqual(rw_base_path, "."))
if (strEqual(rw_base_path, "."))
- rw_base_path = getProgramMainDataPath();
+ rw_base_path = getProgramMainDataPath(
argv[0]
);
/* initialize global program options */
options.server_host = NULL;
/* initialize global program options */
options.server_host = NULL;