From 1dfaa759b919a4b40e8ba5335a5485bee6b26f04 Mon Sep 17 00:00:00 2001 From: Akash Mozumdar Date: Sun, 23 Sep 2018 01:36:54 -0400 Subject: [PATCH] fix crash --- extensions/removerepeat.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/extensions/removerepeat.cpp b/extensions/removerepeat.cpp index a5c1b5c..c02919c 100644 --- a/extensions/removerepeat.cpp +++ b/extensions/removerepeat.cpp @@ -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))