From 62271878b63276ff58201c58a106fc53c1238988 Mon Sep 17 00:00:00 2001 From: Graham Date: Sun, 20 Dec 2020 12:34:50 +0000 Subject: [PATCH] Replace check with require in Js5MasterIndex::read It makes more sense to throw an IllegalArgumentException here. Signed-off-by: Graham --- cache/src/main/kotlin/org/openrs2/cache/Js5MasterIndex.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cache/src/main/kotlin/org/openrs2/cache/Js5MasterIndex.kt b/cache/src/main/kotlin/org/openrs2/cache/Js5MasterIndex.kt index 58f5cf44..0d6ad5a4 100644 --- a/cache/src/main/kotlin/org/openrs2/cache/Js5MasterIndex.kt +++ b/cache/src/main/kotlin/org/openrs2/cache/Js5MasterIndex.kt @@ -36,7 +36,7 @@ public inline class Js5MasterIndex(public val entries: MutableList = 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) {