GUI: fix labels being empty

This commit is contained in:
tildearrow 2022-08-13 18:16:24 -05:00
parent bb5cee4a66
commit 774a949cca
2 changed files with 6 additions and 6 deletions

View File

@ -5074,9 +5074,9 @@ FurnaceGUI::FurnaceGUI():
memset(emptyLabel,0,32);
memset(emptyLabel2,0,32);
strncat(noteOffLabel,"OFF",32);
strncat(noteRelLabel,"===",32);
strncat(macroRelLabel,"REL",32);
strncat(emptyLabel,"...",32);
strncat(emptyLabel2,"..",32);
strncpy(noteOffLabel,"OFF",32);
strncpy(noteRelLabel,"===",32);
strncpy(macroRelLabel,"REL",32);
strncpy(emptyLabel,"...",32);
strncpy(emptyLabel2,"..",32);
}

View File

@ -2781,7 +2781,7 @@ void setupLabel(const char* lStr, char* label, int len) {
memset(label,0,32);
for (int i=0, p=0; i<len; i++) {
signed char cl;
if (lStr[p]!=0) {
if (lStr[p]==0) {
strncat(label," ",32);
} else {
decodeUTF8((const unsigned char*)&lStr[p],cl);