From 4282f3b0a9a16cc732a0662a044744f952fe38ed Mon Sep 17 00:00:00 2001 From: Arjun Ramachandrula Date: Tue, 28 Jul 2020 16:22:03 -0400 Subject: [PATCH] Fixed usage of wrong delete --- support/hololens/ServoApp/strutils.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/support/hololens/ServoApp/strutils.h b/support/hololens/ServoApp/strutils.h index 22198332c90..4ebf8170075 100644 --- a/support/hololens/ServoApp/strutils.h +++ b/support/hololens/ServoApp/strutils.h @@ -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; }