--- a/QTfrontend/CMakeLists.txt Wed Dec 25 08:44:39 2013 -0500
+++ b/QTfrontend/CMakeLists.txt Thu Dec 26 05:48:51 2013 -0800
@@ -61,8 +61,8 @@
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/util/platform)
include_directories(${SDL_INCLUDE_DIR})
include_directories(${SDLMIXER_INCLUDE_DIR})
-include_directories(${PHYSFS_INCLUDE_DIR})
-include_directories(${PHYSLAYER_INCLUDE_DIR})
+include_directories(BEFORE ${PHYSFS_INCLUDE_DIR})
+include_directories(BEFORE ${PHYSLAYER_INCLUDE_DIR})
if(UNIX)
--- a/misc/libphysfs/platform_unix.c Wed Dec 25 08:44:39 2013 -0500
+++ b/misc/libphysfs/platform_unix.c Thu Dec 26 05:48:51 2013 -0800
@@ -193,7 +193,7 @@
if (access(exe, X_OK) == 0) /* Exists as executable? We're done. */
{
- exe[size - binlen] = '\0'; /* chop off filename, leave '/' */
+ exe[size - binlen - 1] = '\0'; /* chop off filename, leave '/' */
return exe;
} /* if */