fix crash

This commit is contained in:
Akash Mozumdar 2018-09-23 01:36:54 -04:00
parent 3df68a6c2c
commit 1dfaa759b9

View File

@ -25,6 +25,7 @@ bool RemoveRepeatedChars(std::wstring& sentence)
bool RemoveCyclicRepeats(std::wstring& sentence)
{
if (sentence == L"") throw std::exception();
int junkLength = 0;
wchar_t junk[2000] = {};
while (wcsstr(sentence.c_str() + junkLength, junk))