|
@@ -667,7 +667,7 @@ static std::string W2S(const std::wstring wstr)
|
|
|
std::memset(str, 0, sizeof(char) * (n + 1));
|
|
|
::WideCharToMultiByte(CP_ACP, 0, wstr.c_str(), -1, &str[0], n, NULL, NULL);
|
|
|
std::string strr(str);
|
|
|
- delete str;
|
|
|
+ delete [] str;
|
|
|
return strr;
|
|
|
}
|
|
|
#else
|
|
@@ -689,7 +689,7 @@ static std::wstring S2W(const std::string str)
|
|
|
std::memset(wstr, 0, (n + 1) * sizeof(wchar_t));
|
|
|
::MultiByteToWideChar(CP_ACP, 0, str.c_str(), -1, &wstr[0], n);
|
|
|
std::wstring strr(wstr);
|
|
|
- delete wstr;
|
|
|
+ delete [] wstr;
|
|
|
return strr;
|
|
|
}
|
|
|
#else
|