diff --git a/src/fsfw/globalfunctions/arrayprinter.cpp b/src/fsfw/globalfunctions/arrayprinter.cpp index 40dc09f5..29d466a9 100644 --- a/src/fsfw/globalfunctions/arrayprinter.cpp +++ b/src/fsfw/globalfunctions/arrayprinter.cpp @@ -58,7 +58,7 @@ void arrayprinter::printHex(const uint8_t *data, size_t size, size_t maxCharPerL #else // General format: 0x01, 0x02, 0x03 so it is number of chars times 6 // plus line break plus small safety margin. - char printBuffer[(size + 1) * 7 + 1] = {}; + char printBuffer[2048] = {}; size_t currentPos = 0; for (size_t i = 0; i < size; i++) { // To avoid buffer overflows. @@ -101,7 +101,7 @@ void arrayprinter::printDec(const uint8_t *data, size_t size, size_t maxCharPerL // General format: 32,243,-12 so it is number of chars times 4 // plus line break plus small safety margin. uint16_t expectedLines = ceil((double)size / maxCharPerLine); - char printBuffer[size * 4 + 1 + expectedLines] = {}; + char printBuffer[2048] = {}; size_t currentPos = 0; for (size_t i = 0; i < size; i++) { // To avoid buffer overflows.