summaryrefslogtreecommitdiff
path: root/src/ai
diff options
context:
space:
mode:
authorMichael Lutz <michi@icosahedron.de>2020-12-06 21:11:50 +0100
committerMichael Lutz <michi@icosahedron.de>2020-12-27 13:19:25 +0100
commitb408fe77f792650ef569f9852165759f960fd52f (patch)
tree6d1f0a134da31bd1d53dee052721d78955d688e6 /src/ai
parent358056ec428d1938b8c9219a60c6fb400115f152 (diff)
downloadopenttd-b408fe77f792650ef569f9852165759f960fd52f.tar.xz
Codechange: Use std::string in file scanners.
Diffstat (limited to 'src/ai')
-rw-r--r--src/ai/ai_scanner.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/ai/ai_scanner.cpp b/src/ai/ai_scanner.cpp
index 1431a2820..9b3613712 100644
--- a/src/ai/ai_scanner.cpp
+++ b/src/ai/ai_scanner.cpp
@@ -32,8 +32,7 @@ void AIScannerInfo::Initialize()
ScriptAllocatorScope alloc_scope(this->engine);
/* Create the dummy AI */
- free(this->main_script);
- this->main_script = stredup("%_dummy");
+ this->main_script = "%_dummy";
extern void Script_CreateDummyInfo(HSQUIRRELVM vm, const char *type, const char *dir);
Script_CreateDummyInfo(this->engine->GetVM(), "AI", "ai");
}