aboutsummaryrefslogtreecommitdiff
path: root/core/src/util.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'core/src/util.cpp')
-rw-r--r--core/src/util.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/src/util.cpp b/core/src/util.cpp
index 4e93f625de..6199109289 100644
--- a/core/src/util.cpp
+++ b/core/src/util.cpp
@@ -271,7 +271,7 @@ string strprintf(const char* format, ...)
if (ret >= 0 && ret < limit)
break;
if (p != buffer)
- delete p;
+ delete[] p;
limit *= 2;
p = new char[limit];
if (p == NULL)
@@ -279,7 +279,7 @@ string strprintf(const char* format, ...)
}
string str(p, p+ret);
if (p != buffer)
- delete p;
+ delete[] p;
return str;
}