From 8cd76455368379ef24525463e9c811cb548527ed Mon Sep 17 00:00:00 2001 From: Graham Date: Tue, 25 May 2021 23:14:26 +0100 Subject: [PATCH] Add sanity check to ConstantPool builder Signed-off-by: Graham --- asm/src/main/kotlin/org/openrs2/asm/packclass/ConstantPool.kt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/asm/src/main/kotlin/org/openrs2/asm/packclass/ConstantPool.kt b/asm/src/main/kotlin/org/openrs2/asm/packclass/ConstantPool.kt index 91f04698..d1e0b5f0 100644 --- a/asm/src/main/kotlin/org/openrs2/asm/packclass/ConstantPool.kt +++ b/asm/src/main/kotlin/org/openrs2/asm/packclass/ConstantPool.kt @@ -160,6 +160,8 @@ public class ConstantPool private constructor( } } + check(!it.hasNext()) + return ConstantPool( stringArray, fieldNamesAndTypes.toTypedArray(),