Skip to content
This repository has been archived by the owner on Apr 8, 2023. It is now read-only.

spellbook: StringIndexOutOfBoundsException and ArithmeticException #2001

Merged
merged 1 commit into from
Nov 10, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -387,6 +387,12 @@ private void onScriptCallbackEvent(final ScriptCallbackEvent event)
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;
Expand Down Expand Up @@ -727,6 +733,11 @@ private static boolean isUnfiltered(final String spell, final Set<String> unfilt
{
boolean b;

if (str.length() == 0)
{
continue;
}

if (str.charAt(0) == '\"')
{
if (str.charAt(str.length() - 1) == '\"')
Expand Down