From c12ebb1c7bd3a65c02f6383a8b450e0947d01980 Mon Sep 17 00:00:00 2001 From: krzys-h Date: Sat, 25 Oct 2014 17:16:39 +0200 Subject: Fixed NewScript (#341) --- src/object/robotmain.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src') diff --git a/src/object/robotmain.cpp b/src/object/robotmain.cpp index f13ef8b..aa52791 100644 --- a/src/object/robotmain.cpp +++ b/src/object/robotmain.cpp @@ -4675,9 +4675,7 @@ void CRobotMain::CreateScene(bool soluce, bool fixScene, bool resetObject) if (line->GetCommand() == "NewScript" && !resetObject) { - char name[200]; - strcpy(name, line->GetParam("name")->AsPath("").c_str()); //TODO: don't make this relative to ai/ - AddNewScriptName(line->GetParam("type")->AsObjectType(OBJECT_NULL), name); + AddNewScriptName(line->GetParam("type")->AsObjectType(OBJECT_NULL), const_cast(line->GetParam("name")->AsPath("ai").c_str())); continue; } -- cgit v1.2.3-1-g7c22