Skip to content

Commit c27c0eb

Browse files
committed
fix: indexOf should returns position from index 0
1 parent 1cac50d commit c27c0eb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/dynamicBuffer.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ export class DynamicBuffer {
279279
start = this.length;
280280
}
281281

282-
return this.buffer.subarray(start, this.length).indexOf(search, 0, encoding);
282+
return this.buffer.subarray(0, this.length).indexOf(search, start, encoding);
283283
}
284284

285285
/**

0 commit comments

Comments
 (0)