From 1c0ae808eb103ddae1a09186c3cdbb095685d658 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/alsa/alsa-utils-dump.c') diff --git a/plugins/alsa/alsa-utils-dump.c b/plugins/alsa/alsa-utils-dump.c index 90e4842..676ab27 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_API_DEBUG(mixer->api, "%s:\n--------------\n%s\n-------------",__func__, buffer); snd_output_close(output); -- cgit 1.2.3-korg