diff --git a/lib/Figments/Input.h b/lib/Figments/Input.h index 1df8704..9055474 100644 --- a/lib/Figments/Input.h +++ b/lib/Figments/Input.h @@ -130,7 +130,7 @@ private: void init(); #ifdef CONFIG_THREADED_INPUTS static void readThread(void* data); - MainLoop* m_threadLoop; + MainLoop* m_threadLoop = nullptr; static uint8_t m_threadBuf[sizeof(InputEvent) * 32]; QueueHandle_t m_queue; StaticQueue_t m_threadQueue; diff --git a/src/Platform.cpp b/src/Platform.cpp index 0106175..eff6b89 100644 --- a/src/Platform.cpp +++ b/src/Platform.cpp @@ -181,7 +181,7 @@ Platform::getLocalTime(struct tm* timedata) return false; #elif defined(BOARD_ESP32) time_t rawtime; - memset(&rawtime, 0, sizeof(rawtime)); + memset(&rawtime, sizeof(rawtime), 0); time(&rawtime); (*timedata) = (*localtime(&rawtime)); return (timedata->tm_year > (2016-1990)); diff --git a/src/main.cpp b/src/main.cpp index 6bf50bd..8b7ffa4 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -89,7 +89,7 @@ void setup() { if (Platform::bootopts.crashCount > 0) { Log.warning(u8"Previous crash detected!!!! We're on attempt %d", Platform::bootopts.crashCount); - char lastTaskBuf[15]; + char lastTaskBuf[16]; strncpy(lastTaskBuf, MainLoop::lastTaskName(), sizeof(lastTaskBuf)); lastTaskBuf[15] = 0; Log.error(u8"Crash occurred in task %s", lastTaskBuf);