diff options
Diffstat (limited to 'engines/sludge/variable.cpp')
-rw-r--r-- | engines/sludge/variable.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/engines/sludge/variable.cpp b/engines/sludge/variable.cpp index 2b0d15feff..a1c736aa93 100644 --- a/engines/sludge/variable.cpp +++ b/engines/sludge/variable.cpp @@ -307,11 +307,8 @@ Common::String getTextFromAnyVar(const variable &from) { } case SVT_INT: { - char *buff = new char[10]; - sprintf(buff, "%i", from.varData.intValue); - Common::String res = buff; - delete []buff; - return res; + Common::String buff = Common::String::format("%i", from.varData.intValue); + return buff; } case SVT_FILE: { |