Replace AssertionError with IllegalStateException

Signed-off-by: Graham <gpe@openrs2.org>
bzip2
Graham 4 years ago
parent 2ff0ccc137
commit 0016b8ab7d
  1. 4
      cache/src/main/kotlin/org/openrs2/cache/Js5Compression.kt

@ -290,9 +290,7 @@ public object Js5Compression {
// Run the entire decompression algorithm to confirm the key is valid.
decrypt(input, lenWithUncompressedLen, key).use { plaintext ->
val uncompressedLen = plaintext.readInt()
if (uncompressedLen < 0) {
throw AssertionError()
}
check(uncompressedLen >= 0)
try {
OutputStream.nullOutputStream().use { output ->

Loading…
Cancel
Save