From 93ca785e9b7e295deb3be7406b37de2c61ef2579 Mon Sep 17 00:00:00 2001 From: Thierry Bultel Date: Wed, 13 Feb 2019 11:05:20 +0100 Subject: alsa-utils-dump: added missing ending null char For some reason, snd_pcm_hw_params_dump does not add a null char at the end of the dumped string. This made weird chars appear in the console Change-Id: I6f2895e730e9bbd0f78139505f9b9e68dd164f2e Signed-off-by: Thierry Bultel --- plugins/alsa/alsa-utils-dump.c | 1 + 1 file changed, 1 insertion(+) (limited to 'plugins') diff --git a/plugins/alsa/alsa-utils-dump.c b/plugins/alsa/alsa-utils-dump.c index 79059ee..4bcc294 100644 --- a/plugins/alsa/alsa-utils-dump.c +++ b/plugins/alsa/alsa-utils-dump.c @@ -153,6 +153,7 @@ PUBLIC void AlsaDumpPcmParams(SoftMixerT *mixer, snd_pcm_hw_params_t *pcmHwParam snd_output_buffer_open(&output); snd_pcm_hw_params_dump(pcmHwParams, output); + snd_output_putc(output,'\0'); snd_output_buffer_string(output, &buffer); AFB_ApiDebug(mixer->api, "%s:\n--------------\n%s\n-------------",__func__, buffer); snd_output_close(output); -- cgit 1.2.3-korg