This commit is contained in:
Kovid Goyal
2024-02-11 06:33:11 +05:30
parent f9fd6ffd46
commit a32e1aafa6

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