fix end offset of fromUtf8Range

This commit is contained in:
Brendan Hansknecht 2023-03-28 18:53:47 -07:00
parent 294d32f62b
commit 457725e87f
No known key found for this signature in database
GPG key ID: 0EA784685083E75B

View file

@ -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.