From 7fc2edd38e6e7983c752d70e0f83d657c2e8fc9d Mon Sep 17 00:00:00 2001 From: kervala Date: Wed, 30 Dec 2015 00:10:08 +0100 Subject: [PATCH] Fixed: Compilation --- code/ryzom/tools/leveldesign/mission_compiler_lib/main.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/code/ryzom/tools/leveldesign/mission_compiler_lib/main.cpp b/code/ryzom/tools/leveldesign/mission_compiler_lib/main.cpp index 71cb054b9..8fa7728e9 100644 --- a/code/ryzom/tools/leveldesign/mission_compiler_lib/main.cpp +++ b/code/ryzom/tools/leveldesign/mission_compiler_lib/main.cpp @@ -90,7 +90,7 @@ int main(int argc, char *argv[]) script += testMission->generateDotScript(); script = script.replace(NL.c_str(), "\n"); - char *tmp = ::getenv("TEMP"); + const char *tmp = ::getenv("TEMP"); FILE *fp = ::fopen((string(tmp)+"/compiled_mission.script").c_str(), "w"); ::fwrite(script.data(), script.size(), 1, fp); @@ -98,7 +98,8 @@ int main(int argc, char *argv[]) // TODO: set diff program in .cfg std::string compareApp = ""; - sint error = system(compareApp+(string(" ")+string(tmp)+"/compiled_mission.script test_compilateur.script").c_str()); + std::string command = NLMISC::toString("%s %s/compiled_mission.script test_compilateur.script", compareApp.c_str(), tmp); + sint error = system(command.c_str()); if (error) nlwarning("'%s' failed with error code %d", "", error);