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[:]