diff --git a/src/lephisto.c b/src/lephisto.c index 0d1e035..a0d6c2c 100644 --- a/src/lephisto.c +++ b/src/lephisto.c @@ -74,7 +74,9 @@ int WINAPI WinMain(HINSTANCE hInst, HINSTANCE hPrevInst, LPSTR lpCmdLine, #else int main(int argc, char** argv) { #endif - + + char buf[PATH_MAX]; + // Print the version. snprintf(version, VERSION_LEN, "%d.%d.%d", VMAJOR, VMINOR, VREV); LOG(" "APPNAME" v%s", version); @@ -90,8 +92,9 @@ int main(int argc, char** argv) { WARN("Unable to create lephisto directory '%s'", lfile_basePath()); // Set the configuration. + snprintf(buf, PATH_MAX, "%s"CONF_FILE, lfile_basePath()); conf_setDefaults(); // Default config values. - conf_loadConfig(CONF_FILE); // Have Lua parse config. + conf_loadConfig(buf); // Have Lua parse config. conf_parseCLI(argc, argv); // Parse CLI arguments. // Load the data basics.