Avoid write() calls with a length of zero

pull/66/head
Graham 4 years ago
parent 8d90a70b6a
commit e480ce282a
  1. 2
      common/src/main/java/dev/openrs2/common/io/SkipOutputStream.kt

@ -12,7 +12,7 @@ class SkipOutputStream(private val out: OutputStream, private var skipBytes: Lon
}
override fun write(b: ByteArray, off: Int, len: Int) {
if (len >= skipBytes) {
if (len > skipBytes) {
out.write(b, off + skipBytes.toInt(), len - skipBytes.toInt())
skipBytes = 0
} else {

Loading…
Cancel
Save