From 7f62daafab120520e37283270c3b2a5f47fe4633 Mon Sep 17 00:00:00 2001 From: igotti-google Date: Wed, 8 Aug 2018 14:12:33 +0300 Subject: [PATCH] Fix regex matcher. --- .../kotlin/kotlin/text/regex/sets/SupplementaryRangeSet.kt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/runtime/src/main/kotlin/kotlin/text/regex/sets/SupplementaryRangeSet.kt b/runtime/src/main/kotlin/kotlin/text/regex/sets/SupplementaryRangeSet.kt index 2de87b16540..f6fe567a144 100644 --- a/runtime/src/main/kotlin/kotlin/text/regex/sets/SupplementaryRangeSet.kt +++ b/runtime/src/main/kotlin/kotlin/text/regex/sets/SupplementaryRangeSet.kt @@ -116,9 +116,9 @@ open internal class SupplementaryRangeSet(charClass: AbstractCharClass, val igno var index = startIndex val high = testString[index++] - val result = next.matches(index, testString, matchResult) - if (contains(high) && result >= 0) { - return result + if (contains(high)) { + val result = next.matches(index, testString, matchResult) + if (result >= 0) return result } if (index < rightBound) {