Skip to content

Commit

Permalink
fix bug where position is incorrectly increased by array size instead…
Browse files Browse the repository at this point in the history
… of length passed in
  • Loading branch information
thebehera committed Jan 7, 2024
1 parent b983151 commit bdcb82e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/nativeMain/kotlin/com/ditchoom/buffer/NativeBuffer.kt
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ data class NativeBuffer(

override fun writeBytes(bytes: ByteArray, offset: Int, length: Int): WriteBuffer {
bytes.copyInto(data, position, offset, offset + length)
position += bytes.size
position += length
return this
}

Expand Down

0 comments on commit bdcb82e

Please sign in to comment.