From: Takashi Iwai Date: Thu, 11 Jul 2024 15:08:11 +0000 (+0200) Subject: arecordmidi2: Fix truncated text in meta data text handling X-Git-Tag: v1.2.13~40 X-Git-Url: https://git.alsa-project.org/?a=commitdiff_plain;h=33f6870f564d189829eb4a8d52bb53488599b9f4;p=alsa-utils.git arecordmidi2: Fix truncated text in meta data text handling The current code didn't proceed the text position buffer and the text was always truncated in 12 bytes. Let's fix it. Fixes: 74daf3a93a31 ("arecordmidi2: Add options to put meta data texts") Signed-off-by: Takashi Iwai --- diff --git a/seq/aplaymidi2/arecordmidi2.c b/seq/aplaymidi2/arecordmidi2.c index 4ab7659..68a9d7d 100644 --- a/seq/aplaymidi2/arecordmidi2.c +++ b/seq/aplaymidi2/arecordmidi2.c @@ -416,6 +416,7 @@ static void write_metadata(FILE *file, unsigned int type, const char *text) fwrite(d.raw, 4, 4, file); len -= size; + text += size; format = SND_UMP_FLEX_DATA_MSG_FORMAT_CONTINUE; } }