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

Commit

Permalink
fix: aioob in ChatManager (#643)
Browse files Browse the repository at this point in the history
* fix: aioob in chatmanager
  • Loading branch information
ryanzhoudev authored Dec 8, 2022
1 parent 5739df9 commit d98fd1d
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -960,7 +960,8 @@ public static Pair<Boolean, ITextComponent> applyToDialogue(ITextComponent compo
// Detect new messages
// If dialogue is the exact same as previously then most likely a message was received
// The second check is for the colors changing on the shift prompt
if (dialogue.equals(last) && dialogue.get(dialogue.size() - 1).getSiblings().equals(last.get(last.size() - 1).getSiblings())) {
List<ITextComponent> lastCopy = last; // Copy last to avoid race condition
if (dialogue.equals(lastCopy) && dialogue.get(dialogue.size() - 1).getSiblings().equals(lastCopy.get(lastCopy.size() - 1).getSiblings())) {
newMessageCount += 2; // 2 because this needs to account for the new lines
// new lines are ignored later in the processing logic but they are still present here and need to be fed to the processor

Expand Down

0 comments on commit d98fd1d

Please sign in to comment.