diff --git a/common/src/main/java/dev/openrs2/common/io/SkipOutputStream.kt b/common/src/main/java/dev/openrs2/common/io/SkipOutputStream.kt index e9bbe3ff77..55f99f7918 100644 --- a/common/src/main/java/dev/openrs2/common/io/SkipOutputStream.kt +++ b/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 {