diff options
fix(StringConsumer): No runtime error in words consumer when start is too large
1 files changed, 1 insertions, 1 deletions
| -rw-r--r-- | src/StringConsumer/IWordsConsumer.cl | 2 |
diff --git a/src/StringConsumer/IWordsConsumer.cl b/src/StringConsumer/IWordsConsumer.cl index cdd0186..4c184bf 100644 --- a/src/StringConsumer/IWordsConsumer.cl +++ b/src/StringConsumer/IWordsConsumer.cl @@ -36,7 +36,7 @@ class WordList inherits System { }}; any_starts(s: String, start: Int) : Int { - if word = "" + if or(word = "", s.length() <= start) then 0 else if s.substr(start, word.length()) = word then word.length() |
