[Colorlcd] Support model notes with spaces and prevent radio crash due to filename (#645)

* support both versions of model notes file name. Fix for #641

* Adding support for names with spaces

* Fix compilation
This commit is contained in:
eshifri
2021-09-02 10:45:58 +10:00
committed by GitHub
parent 9a2461c7e9
commit 88b8ac86fb
5 changed files with 58 additions and 10 deletions
+1 -1
View File
@@ -303,7 +303,7 @@ char * getModelAudioPath(char * path)
{
strcpy(path, SOUNDS_PATH "/");
strncpy(path+SOUNDS_PATH_LNG_OFS, currentLanguagePack->id, 2);
char * result = strcat_currentmodelname(path+sizeof(SOUNDS_PATH));
char * result = strcat_currentmodelname(path+sizeof(SOUNDS_PATH), 0);
*result++ = '/';
*result = '\0';
return result;