X-Git-Url: https://git.jsancho.org/?p=lugaru.git;a=blobdiff_plain;f=Source%2Fmain.cpp;h=cacfabdc99b2a0632e8b759636a39b00d73151d9;hp=3593c691c82b7588f501a6f3e63235fea9784746;hb=a8e0e96af3222c42663b3c60158caed20ac46829;hpb=0aab437dc560d2afa982e61cc2547756ad7b0761
diff --git a/Source/main.cpp b/Source/main.cpp
index 3593c69..cacfabd 100644
--- a/Source/main.cpp
+++ b/Source/main.cpp
@@ -32,13 +32,14 @@ along with Lugaru. If not, see .
#include
#include
#include
-#include
using namespace Game;
#ifdef WIN32
#include
#include
+#else
+#include
#endif
extern float multiplier;
@@ -578,7 +579,10 @@ static inline void chdirToAppPath(const char* argv0)
*ptr = '\0';
}
#endif
- chdir(dir);
+ errno = 0;
+ if (chdir(dir) != 0) {
+ printf("Error changing dir to '%s' (%s).\n", dir, strerror(errno));
+ }
free(dir);
}
}