From afa72d21aa81a9876b3f9e50f3bd6f4cd56cdac0 Mon Sep 17 00:00:00 2001 From: probonopd Date: Thu, 30 May 2024 18:43:48 +0200 Subject: [PATCH] Attempt to fix #646 (#649) * Attempt to fix #646 https://github.com/probonopd/MiniDexed/issues/648 * SetVoiceName() suggested by @diyelectromusic --- src/minidexed.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/minidexed.cpp b/src/minidexed.cpp index 9547baf..02d8fd6 100644 --- a/src/minidexed.cpp +++ b/src/minidexed.cpp @@ -1767,8 +1767,9 @@ void CMiniDexed::SetVoiceName (std::string VoiceName, unsigned nTG) { assert (nTG < CConfig::ToneGenerators); assert (m_pTG[nTG]); - char Name[10]; + char Name[11]; strncpy(Name, VoiceName.c_str(),10); + Name[10] = '\0'; m_pTG[nTG]->getName (Name); }