Menu

Diff of /trunk/src/UnicodeUtils.cpp [r612] .. [r613]  Maximize  Restore

Switch to side-by-side view

--- a/trunk/src/UnicodeUtils.cpp
+++ b/trunk/src/UnicodeUtils.cpp
@@ -39,7 +39,7 @@
     int ret = WideCharToMultiByte(CP_UTF8, 0, wide.c_str(), len, narrow, size-1, NULL, NULL);
     narrow[ret] = 0;
     std::string sRet = std::string(narrow);
-    delete narrow;
+    delete [] narrow;
     return sRet;
 }
 
@@ -53,7 +53,7 @@
     int ret = WideCharToMultiByte(CP_ACP, 0, wide.c_str(), len, narrow, size-1, NULL, NULL);
     narrow[ret] = 0;
     std::string sRet = std::string(narrow);
-    delete narrow;
+    delete [] narrow;
     return sRet;
 }
 
@@ -67,7 +67,7 @@
     int ret = MultiByteToWideChar(CP_UTF8, 0, multibyte.c_str(), len, wide, size - 1);
     wide[ret] = 0;
     std::wstring sRet = std::wstring(wide);
-    delete wide;
+    delete [] wide;
     return sRet;
 }
 #endif