spellbook: StringIndexOutOfBoundsException and ArithmeticException (#2001)
This commit is contained in:
@@ -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) == '\"')
|
||||
|
||||
Reference in New Issue
Block a user