diff options
Diffstat (limited to 'src/script/api/script_bridge.cpp')
-rw-r--r-- | src/script/api/script_bridge.cpp | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/script/api/script_bridge.cpp b/src/script/api/script_bridge.cpp index 748489655..50f3e3f0a 100644 --- a/src/script/api/script_bridge.cpp +++ b/src/script/api/script_bridge.cpp @@ -136,11 +136,7 @@ static void _DoCommandReturnBuildBridge1(class ScriptInstance *instance) { if (!IsValidBridge(bridge_id)) return NULL; - static const int len = 64; - char *bridge_name = MallocT<char>(len); - - ::GetString(bridge_name, ::GetBridgeSpec(bridge_id)->transport_name[0], &bridge_name[len - 1]); - return bridge_name; + return GetString(::GetBridgeSpec(bridge_id)->transport_name[0]); } /* static */ int32 ScriptBridge::GetMaxSpeed(BridgeID bridge_id) |