From e480ce282a6840ad4ef030a4884bc19c83452cec Mon Sep 17 00:00:00 2001 From: Graham Date: Thu, 13 Feb 2020 19:00:22 +0000 Subject: [PATCH] Avoid write() calls with a length of zero --- common/src/main/java/dev/openrs2/common/io/SkipOutputStream.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 {