Skip to content

Commit fe4f4a1

Browse files
authored
Fixes index out of bounds default variables when converting (#7938)
* Fix index out of bounds on default variables that get converted * Update aliases * Update aliases
1 parent d0088f7 commit fe4f4a1

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/main/java/ch/njol/skript/lang/VariableString.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -590,6 +590,9 @@ public String toString(@Nullable Event event, boolean debug) {
590590
typeHints.forEach(builder -> builder.append(object));
591591
continue;
592592
}
593+
if (hintIndex >= savedHints.length) {
594+
break;
595+
}
593596
StringBuilder[] current = typeHints.toArray(new StringBuilder[0]);
594597
for (ClassInfo<?> classInfo : Classes.getAllSuperClassInfos(savedHints[hintIndex])) {
595598
for (StringBuilder builder : current) {

0 commit comments

Comments
 (0)