summaryrefslogtreecommitdiff
path: root/src/script/api/script_engine.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/script/api/script_engine.cpp')
-rw-r--r--src/script/api/script_engine.cpp6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/script/api/script_engine.cpp b/src/script/api/script_engine.cpp
index 4ba4e9f82..54fc54cb1 100644
--- a/src/script/api/script_engine.cpp
+++ b/src/script/api/script_engine.cpp
@@ -36,12 +36,8 @@
{
if (!IsValidEngine(engine_id)) return NULL;
- static const int len = 64;
- char *engine_name = MallocT<char>(len);
-
::SetDParam(0, engine_id);
- ::GetString(engine_name, STR_ENGINE_NAME, &engine_name[len - 1]);
- return engine_name;
+ return GetString(STR_ENGINE_NAME);
}
/* static */ CargoID ScriptEngine::GetCargoType(EngineID engine_id)