Fixed an issue with wrong buffer size

This commit is contained in:
Steffen Gaisser 2022-02-23 21:20:22 +01:00
parent 09815f5cce
commit 32381a7872

View File

@ -107,7 +107,7 @@ void arrayprinter::printDec(const uint8_t *data, size_t size, size_t maxCharPerL
break;
}
currentPos += snprintf(printBuffer + currentPos, 3, "%d", data[i]);
currentPos += snprintf(printBuffer + currentPos, 4, "%d", data[i]);
if (i < size - 1) {
currentPos += sprintf(printBuffer + currentPos, ",");
if (i > 0 and (i + 1) % maxCharPerLine == 0) {