summaryrefslogtreecommitdiffstats
path: root/src/object/robotmain.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/object/robotmain.cpp')
-rw-r--r--src/object/robotmain.cpp4
1 files changed, 1 insertions, 3 deletions
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<char*>(line->GetParam("name")->AsPath("ai").c_str()));
continue;
}