From: sapier Date: Sat, 7 Mar 2015 14:22:35 +0000 (+0100) Subject: Fix RUN_IN_PLACE broken due to invalid usage of assert X-Git-Tag: 0.4.13~518 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=9da99efca226c377d3bc2914561edffd812a9c1a;p=oweals%2Fminetest.git Fix RUN_IN_PLACE broken due to invalid usage of assert --- diff --git a/src/porting.cpp b/src/porting.cpp index 6d0ab78c4..64a51c7f5 100644 --- a/src/porting.cpp +++ b/src/porting.cpp @@ -375,7 +375,7 @@ void initializePaths() char buf[BUFSIZ]; memset(buf, 0, BUFSIZ); // Get path to executable - assert(readlink("/proc/self/exe", buf, BUFSIZ-1) != -1); + FATAL_ERROR_IF(readlink("/proc/self/exe", buf, BUFSIZ-1) == -1, "Failed to get cwd"); pathRemoveFile(buf, '/');