Skip to content

Commit 017ea2a

Browse files
Fixed KMP search for empty string
1 parent 878fa80 commit 017ea2a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/ui/Utils.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -335,6 +335,8 @@ namespace utils {
335335
}
336336

337337
static const std::vector<int> preKMP(const juce::String& strLong) {
338+
if (strLong.isEmpty()) { return {}; }
339+
338340
std::vector<int> next;
339341
next.resize(strLong.length());
340342

0 commit comments

Comments
 (0)