Skip to content

Commit

Permalink
Minor fix
Browse files Browse the repository at this point in the history
  • Loading branch information
soywiz committed Jun 30, 2023
1 parent a0218b2 commit 8c1ddc0
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ class FastByteArrayInputStream(val ba: ByteArray, offset: Int = 0, val start: In
val startOffset = offset
val index = ba.indexOf(0.toByte(), offset)
val end = if (index >= 0) index else ba.size
val str = ba.copyOfRange(startOffset, end - startOffset).toString(charset)
val str = ba.copyOfRange(startOffset, end).toString(charset)
offset = if (index >= 0) end + 1 else end
return str
}
Expand Down

0 comments on commit 8c1ddc0

Please sign in to comment.