mirror of
https://github.com/Artikash/Textractor.git
synced 2024-12-23 17:04:12 +08:00
fix crash
This commit is contained in:
parent
3df68a6c2c
commit
1dfaa759b9
@ -25,6 +25,7 @@ bool RemoveRepeatedChars(std::wstring& sentence)
|
|||||||
|
|
||||||
bool RemoveCyclicRepeats(std::wstring& sentence)
|
bool RemoveCyclicRepeats(std::wstring& sentence)
|
||||||
{
|
{
|
||||||
|
if (sentence == L"") throw std::exception();
|
||||||
int junkLength = 0;
|
int junkLength = 0;
|
||||||
wchar_t junk[2000] = {};
|
wchar_t junk[2000] = {};
|
||||||
while (wcsstr(sentence.c_str() + junkLength, junk))
|
while (wcsstr(sentence.c_str() + junkLength, junk))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user