From 6b348f6128c48e8b899b76f1240e584bd05d5dd6 Mon Sep 17 00:00:00 2001 From: Cohee <18619528+Cohee1207@users.noreply.github.com> Date: Fri, 1 Dec 2023 18:55:11 +0200 Subject: [PATCH] Fix trailing stopping strings removal --- public/script.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/script.js b/public/script.js index 9e6db4b2b..4b971fd4c 100644 --- a/public/script.js +++ b/public/script.js @@ -4399,7 +4399,7 @@ function cleanUpMessage(getMessage, isImpersonate, isContinue, displayIncomplete for (const stoppingString of stoppingStrings) { if (stoppingString.length) { - for (let j = stoppingString.length - 1; j > 0; j--) { + for (let j = stoppingString.length; j > 0; j--) { if (getMessage.slice(-j) === stoppingString.slice(0, j)) { getMessage = getMessage.slice(0, -j); break;