Fixed usage of wrong delete

This commit is contained in:
Arjun Ramachandrula 2020-07-28 16:22:03 -04:00
parent 582a7a7afa
commit 4282f3b0a9

View file

@ -13,7 +13,7 @@ std::wstring format(const std::wstring &txt, Args... args) {
auto ptr = new wchar_t[size];
swprintf(ptr, size, txt.c_str(), args...);
auto wstr = std::wstring(ptr);
delete ptr;
delete[] ptr;
return wstr;
}