spellbook: StringIndexOutOfBoundsException and ArithmeticException (#2001)

This commit is contained in:
Owain van Brakel
2019-11-10 06:36:49 +01:00
committed by Ganom
parent 6025c29d3c
commit 531b626516

View File

@@ -387,6 +387,12 @@ public class SpellbookPlugin extends Plugin
break;
case "resizeSpell":
final int size = this.size;
if (size == 0)
{
return;
}
final int columns = clamp(FULL_WIDTH / size, 2, 3);
iStack[iStackSize - 2] = size;
@@ -727,6 +733,11 @@ public class SpellbookPlugin extends Plugin
{
boolean b;
if (str.length() == 0)
{
continue;
}
if (str.charAt(0) == '\"')
{
if (str.charAt(str.length() - 1) == '\"')