mirror of
https://github.com/roc-lang/roc.git
synced 2024-11-13 09:49:11 +03:00
Merge pull request #5225 from roc-lang/utf8-range-slice-offset
fix end offset of fromUtf8Range
This commit is contained in:
commit
6714ada624
@ -1921,7 +1921,7 @@ pub fn fromUtf8Range(arg: RocList, start: usize, count: usize, update_mode: Upda
|
||||
.problem_code = Utf8ByteProblem.InvalidStartByte,
|
||||
};
|
||||
}
|
||||
const bytes = @ptrCast([*]const u8, arg.bytes)[start..count];
|
||||
const bytes = @ptrCast([*]const u8, arg.bytes)[start .. start + count];
|
||||
|
||||
if (isValidUnicode(bytes)) {
|
||||
// Make a seamless slice of the input.
|
||||
|
Loading…
Reference in New Issue
Block a user