Mcu32
Well-known member
by convention, printTo() returns the number of characters written.
not here:
github.com
(may cause string corruption or wrong length later)
Solution:
use return n;
not here:
cores/teensy4/IPAddress.cpp at master · PaulStoffregen/cores
Teensy Core Libraries for Arduino. Contribute to PaulStoffregen/cores development by creating an account on GitHub.
(may cause string corruption or wrong length later)
Solution:
Code:
size_t IPAddress::printTo(Print& p) const
{
size_t n = 0;
int i=0;
while (1) {
n += p.print(_address.bytes[i], DEC);
if (++i >= 4) return n;
n += p.write('.');
}
}
Last edited: