Fix fields_proc in strings and bytes

This commit is contained in:
gingerBill
2021-12-11 12:04:34 +00:00
parent c889591333
commit 85f8c8df91
2 changed files with 2 additions and 2 deletions

View File

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

View File

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