aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2021-12-11 12:04:34 +0000
committergingerBill <bill@gingerbill.org>2021-12-11 12:04:34 +0000
commit85f8c8df91022fae3fef996cd45b9e631e6b2a66 (patch)
tree8caa4ff3de3b22ef9b8f94d8778bfd0da0dc6606
parentc88959133365d988c7b7b399408cab58a93e4b99 (diff)
Fix `fields_proc` in `strings` and `bytes`
-rw-r--r--core/bytes/bytes.odin2
-rw-r--r--core/strings/strings.odin2
2 files changed, 2 insertions, 2 deletions
diff --git a/core/bytes/bytes.odin b/core/bytes/bytes.odin
index cbc1e2506..1e83b93c8 100644
--- a/core/bytes/bytes.odin
+++ b/core/bytes/bytes.odin
@@ -1143,7 +1143,7 @@ fields_proc :: proc(s: []byte, f: proc(rune) -> bool, allocator := context.alloc
}
if start >= 0 {
- append(&subslices, s[start : end])
+ append(&subslices, s[start : len(s)])
}
return subslices[:]
diff --git a/core/strings/strings.odin b/core/strings/strings.odin
index 7a9744d83..72f29e5d6 100644
--- a/core/strings/strings.odin
+++ b/core/strings/strings.odin
@@ -1288,7 +1288,7 @@ fields_proc :: proc(s: string, f: proc(rune) -> bool, allocator := context.alloc
}
if start >= 0 {
- append(&substrings, s[start : end])
+ append(&substrings, s[start : len(s)])
}
return substrings[:]