From f8c70aeed359e3d00ffae04e1e47f8b21555844b Mon Sep 17 00:00:00 2001 From: moi15moi Date: Sun, 21 Apr 2024 19:46:29 -0400 Subject: [PATCH] Fix combine_karaoke See https://github.com/Ristellise/AegisubDC/issues/36 --- src/command/edit.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/command/edit.cpp b/src/command/edit.cpp index 333cdc6d5d..e9ad1cea36 100644 --- a/src/command/edit.cpp +++ b/src/command/edit.cpp @@ -769,9 +769,7 @@ static void combine_lines(agi::Context *c, void (*combiner)(AssDialogue *, AssDi static void combine_karaoke(AssDialogue *first, AssDialogue *second) { if (second) - first->Text = first->Text.get() + "{\\k" + std::to_string((second->End - second->Start) / 10) + "}" + second->Text.get(); - else - first->Text = "{\\k" + std::to_string((first->End - first->Start) / 10) + "}" + first->Text.get(); + first->Text = first->Text.get() + " {\\k" + std::to_string((second->Start - first->End) / 10) + "}" + second->Text.get(); } static void combine_concat(AssDialogue *first, AssDialogue *second) {