diff --git a/src/modules/CannedMessageModule.cpp b/src/modules/CannedMessageModule.cpp index a10add057..dada48193 100644 --- a/src/modules/CannedMessageModule.cpp +++ b/src/modules/CannedMessageModule.cpp @@ -179,7 +179,7 @@ int CannedMessageModule::splitConfiguredMessages() while (i < upTo) { if (this->messageBuffer[i] == '|') { this->messageBuffer[i] = '\0'; // End previous message - if (tempCount >= CANNED_MESSAGE_MODULE_MESSAGE_MAX_COUNT) + if (tempCount >= CANNED_MESSAGE_MODULE_MESSAGE_MAX_COUNT - 1) break; tempMessages[tempCount++] = (this->messageBuffer + i + 1); } diff --git a/src/platform/extra_variants/t5s3_epaper/variant.cpp b/src/platform/extra_variants/t5s3_epaper/variant.cpp index 9a38ddf73..6c1dacb64 100644 --- a/src/platform/extra_variants/t5s3_epaper/variant.cpp +++ b/src/platform/extra_variants/t5s3_epaper/variant.cpp @@ -36,7 +36,7 @@ class TouchInkHUDBridge : public Observer // Check whether a system applet (e.g. menu) is currently handling input bool systemHandlingInput = false; - for (NicheGraphics::InkHUD::SystemApplet *sa : inkhud->systemApplets) { + for (const NicheGraphics::InkHUD::SystemApplet *sa : inkhud->systemApplets) { if (sa->handleInput) { systemHandlingInput = true; break;