Writting text with Unicode::fromUTF8 bug
Hi,
I haver two text areas AAA and BBB both with wildcard buffer to write to. When use the funcion Unicode::fromUTF8 to write some text and the text is larger than the buffer the values of the two text areas are concatenated and writted on the first area.
If title lenght is larger than text area buffer the two buffers are concatenated and pinted in the fist text area:
Unicode::fromUTF8((const uint8_t*)title, AAABuffer, AAA_SIZE);
Unicode::fromUTF8((const uint8_t*)title2, BBBBuffer, BBB_SIZE);
The solucion is to limit the size to one less:
Unicode::fromUTF8((const uint8_t*)title, AAABuffer, AAA_SIZE - 1);
Unicode::fromUTF8((const uint8_t*)title2, BBBBuffer, BBB_SIZE - 1);
I think this is a small bug and the compiler must limit it.
Thanks
