From 2e5366a36ee5a050f813ba8288987425ea6b1faa Mon Sep 17 00:00:00 2001 From: bluefireoly Date: Sat, 13 Feb 2021 15:32:17 +0100 Subject: [PATCH] Fix scroll progress bug --- .../kotlin/net/axay/kspigot/gui/elements/GUISpaceCompound.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/kotlin/net/axay/kspigot/gui/elements/GUISpaceCompound.kt b/src/main/kotlin/net/axay/kspigot/gui/elements/GUISpaceCompound.kt index d86b9e97..85365fae 100644 --- a/src/main/kotlin/net/axay/kspigot/gui/elements/GUISpaceCompound.kt +++ b/src/main/kotlin/net/axay/kspigot/gui/elements/GUISpaceCompound.kt @@ -69,7 +69,7 @@ abstract class AbstractGUISpaceCompound internal constructo private fun recalculateCurrentContent() { - if (scrollProgress >= content.size) + if (scrollProgress > content.size) throw IllegalStateException("The scrollProgress is greater than the content size.") // avoid IndexOutOfBoundsException