diff --git a/src/display.cpp b/src/display.cpp index c1d5aa7..3c27587 100644 --- a/src/display.cpp +++ b/src/display.cpp @@ -119,7 +119,6 @@ const char* FormatPercentage(uint8_t percentage) { char* value = new char[6]; - itoa(percentage, value, 10); uint8_t length = strlen(value); diff --git a/src/screen/countdown.cpp b/src/screen/countdown.cpp index 5e6ef18..b663005 100644 --- a/src/screen/countdown.cpp +++ b/src/screen/countdown.cpp @@ -14,7 +14,9 @@ inline uint32_t intDivCeil(uint32_t x, uint32_t y) void CountdownScreen::printRemainingTime() { - LCDPrintLineCentered(getDisplay(), 1, FormatTime(mLastDisplayed)); + const char* time = FormatTime(mLastDisplayed); + LCDPrintLineCentered(getDisplay(), 1, time); + delete[] time; }