mirror of
https://github.com/oven-sh/bun
synced 2026-02-10 19:08:50 +00:00
fix debug crash in bun.strings.firstNonASCII16 when input is multiple of ascii_u16_vector_size (#9080)
This commit is contained in:
@@ -4352,7 +4352,7 @@ pub fn firstNonASCII16(comptime Slice: type, slice: Slice) ?u32 {
|
||||
|
||||
if (Environment.enableSIMD and Environment.isNative) {
|
||||
const end_ptr = remaining.ptr + remaining.len - (remaining.len % ascii_u16_vector_size);
|
||||
if (remaining.len > ascii_u16_vector_size) {
|
||||
if (remaining.len >= ascii_u16_vector_size) {
|
||||
while (remaining.ptr != end_ptr) {
|
||||
const vec: AsciiU16Vector = remaining[0..ascii_u16_vector_size].*;
|
||||
const max_value = @reduce(.Max, vec);
|
||||
|
||||
Reference in New Issue
Block a user