diff --git a/GUI/host/textthread.cc b/GUI/host/textthread.cc index aee42ef..0ef89f2 100644 --- a/GUI/host/textthread.cc +++ b/GUI/host/textthread.cc @@ -37,7 +37,6 @@ void TextThread::Flush() sentence = std::wstring(converted, MultiByteToWideChar(status & USING_UTF8 ? CP_UTF8 : 932, 0, buffer.data(), buffer.size(), converted, buffer.size())); delete[] converted; } - memset(buffer.data(), 0, buffer.size()); buffer.clear(); } AddSentence(sentence); diff --git a/extensions/googletranslate.cpp b/extensions/googletranslate.cpp index 6a2a316..808fcaa 100644 --- a/extensions/googletranslate.cpp +++ b/extensions/googletranslate.cpp @@ -74,7 +74,7 @@ bool ProcessSentence(std::wstring& sentence, const InfoForExtension* miscInfo) if (buffer[0] == '[') { wchar_t wbuffer[10000] = {}; - MultiByteToWideChar(CP_UTF8, 0, (char*)buffer, -1, wbuffer, 10000); + MultiByteToWideChar(CP_UTF8, 0, buffer, -1, wbuffer, 10000); std::wstring response(wbuffer); std::wregex translationFinder(L"\\[\"(.*?)\",[n\"]"); std::wsmatch results;