diff options
Diffstat (limited to 'src/script/api/script_group.cpp')
-rw-r--r-- | src/script/api/script_group.cpp | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/script/api/script_group.cpp b/src/script/api/script_group.cpp index 3dfc50a09..b04ece2fa 100644 --- a/src/script/api/script_group.cpp +++ b/src/script/api/script_group.cpp @@ -64,12 +64,8 @@ { if (!IsValidGroup(group_id)) return NULL; - static const int len = 64; - char *group_name = MallocT<char>(len); - ::SetDParam(0, group_id); - ::GetString(group_name, STR_GROUP_NAME, &group_name[len - 1]); - return group_name; + return GetString(STR_GROUP_NAME); } /* static */ bool ScriptGroup::EnableAutoReplaceProtection(GroupID group_id, bool enable) |