fix: use switch indirection to fetch the proper name for switch audio (#2599)

Fixes #2576
This commit is contained in:
Raphael Coeffic
2022-10-19 21:22:44 +10:00
committed by GitHub
parent 2067140552
commit d7598c8ed8
+1 -1
View File
@@ -332,7 +332,7 @@ void getSwitchAudioFile(char * filename, swsrc_t index)
if (index <= SWSRC_LAST_SWITCH) {
div_t swinfo = switchInfo(index);
*str++ = 'S';
*str++ = 'A' + swinfo.quot;
*str++ = getRawSwitchFromIdx(swinfo.quot);
const char * positions[] = { "-up", "-mid", "-down" };
strcpy(str, positions[swinfo.rem]);
}