X-Git-Url: https://git.jsancho.org/?p=lugaru.git;a=blobdiff_plain;f=Source%2Fmain.cpp;h=cacfabdc99b2a0632e8b759636a39b00d73151d9;hp=99d5465d48830a17572488586f89d0ae2d66bdd6;hb=a8e0e96af3222c42663b3c60158caed20ac46829;hpb=72217fbefd03881048287da8345925e1b89b5b9b
diff --git a/Source/main.cpp b/Source/main.cpp
index 99d5465..cacfabd 100644
--- a/Source/main.cpp
+++ b/Source/main.cpp
@@ -1,6 +1,6 @@
/*
Copyright (C) 2003, 2010 - Wolfire Games
-Copyright (C) 2010-2016 - Lugaru contributors (see AUTHORS file)
+Copyright (C) 2010-2017 - Lugaru contributors (see AUTHORS file)
This file is part of Lugaru.
@@ -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);
}
}