diff options
Diffstat (limited to 'src/script/api/script_vehicle.cpp')
-rw-r--r-- | src/script/api/script_vehicle.cpp | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/script/api/script_vehicle.cpp b/src/script/api/script_vehicle.cpp index 13ccce518..b6a28af4f 100644 --- a/src/script/api/script_vehicle.cpp +++ b/src/script/api/script_vehicle.cpp @@ -270,12 +270,8 @@ { if (!IsValidVehicle(vehicle_id)) return NULL; - static const int len = 64; - char *vehicle_name = MallocT<char>(len); - ::SetDParam(0, vehicle_id); - ::GetString(vehicle_name, STR_VEHICLE_NAME, &vehicle_name[len - 1]); - return vehicle_name; + return GetString(STR_VEHICLE_NAME); } /* static */ int32 ScriptVehicle::GetAge(VehicleID vehicle_id) |