Skip to content
This repository was archived by the owner on Aug 18, 2020. It is now read-only.

Commit cc79202

Browse files
committed
Fixed #76. Fixed a while(true) loop, which kindly blows up the your memory.
1 parent 1f6e0f7 commit cc79202

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/scala/org/codeoverflow/chatoverflow/requirement/service/discord/impl/DiscordChatInputImpl.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,7 +314,7 @@ object DiscordChatInputImpl {
314314
val content = message.getContentRaw
315315
var index = content.indexOf(emote.getAsMention)
316316
while (index != -1) {
317-
index = content.indexOf(emote.getAsMention)
317+
index = content.indexOf(emote.getAsMention, index + 1)
318318
emotes += new DiscordChatCustomEmoticon(emote.getName, index, emote.isAnimated, emote.getId)
319319
}
320320
}

0 commit comments

Comments
 (0)