Taranis 128x64

This commit is contained in:
Raphael Coeffic
2022-06-11 15:38:08 +02:00
committed by Raphael Coeffic
parent 352c273d32
commit cf06efea87
8 changed files with 38 additions and 12 deletions
+3 -1
View File
@@ -571,7 +571,9 @@ char *getSourceString(char (&dest)[L], mixsrc_t idx)
char* pos = strAppend(dest, STR_CHAR_INPUT, sizeof(STR_CHAR_INPUT) - 1);
if (g_model.inputNames[idx][0] != '\0' && (dest_len > sizeof(g_model.inputNames[idx]))) {
memset(pos, 0, sizeof(g_model.inputNames[idx]) + 1);
strncpy(pos, g_model.inputNames[idx], sizeof(g_model.inputNames[idx]));
size_t input_len = std::min(dest_len - 1, sizeof(g_model.inputNames[idx]));
strncpy(pos, g_model.inputNames[idx], input_len);
pos[input_len] = '\0';
} else {
strAppendUnsigned(pos, idx + 1, 2);
}