This commit is contained in:
Kovid Goyal 2024-02-11 06:33:11 +05:30
parent f9fd6ffd46
commit a32e1aafa6
No known key found for this signature in database
GPG key ID: 06BC317B515ACE7C

View file

@ -71,7 +71,7 @@ func read_input(input_file *os.File, input_file_name string, input_channel chan<
if count_carriage_returns {
process_chunk = func(chunk []byte) {
for len(chunk) > 0 {
idx := simdstring.UnsafeIndexByte2(chunk, '\n', '\r')
idx := simdstring.IndexByte2(chunk, '\n', '\r')
if idx == -1 {
_, _ = output_buf.Write(chunk)
chunk = nil