aboutsummaryrefslogtreecommitdiff
path: root/core/strings
diff options
context:
space:
mode:
Diffstat (limited to 'core/strings')
-rw-r--r--core/strings/strings.odin3
1 files changed, 2 insertions, 1 deletions
diff --git a/core/strings/strings.odin b/core/strings/strings.odin
index 539829a1a..5cee25a66 100644
--- a/core/strings/strings.odin
+++ b/core/strings/strings.odin
@@ -1792,7 +1792,8 @@ last_index_any :: proc(s, chars: string) -> (res: int) {
if r >= utf8.RUNE_SELF {
r = utf8.RUNE_ERROR
}
- return index_rune(chars, r)
+ i := index_rune(chars, r)
+ return i if i < 0 else 0
}
if len(s) > 8 {