Replace check with require in Js5MasterIndex::read

It makes more sense to throw an IllegalArgumentException here.

Signed-off-by: Graham <gpe@openrs2.org>
Graham 4 years ago
parent b8b0e2b361
commit 62271878b6
  1. 2
      cache/src/main/kotlin/org/openrs2/cache/Js5MasterIndex.kt

@ -36,7 +36,7 @@ public inline class Js5MasterIndex(public val entries: MutableList<Entry> = muta
public companion object {
public fun read(buf: ByteBuf): Js5MasterIndex {
check(buf.readableBytes() % 8 == 0)
require(buf.readableBytes() % 8 == 0)
val index = Js5MasterIndex()
while (buf.isReadable) {

Loading…
Cancel
Save