cancel
Showing results for 
Search instead for 
Did you mean: 

Unicode::snprintfFloat partly broken in 4.22

PBull
Associate III

Hello,

I'm using the Unicode::snprintfFloat function with the '#' flag, which should add a decimal point even if there are not decimals. This works fine in 4.21.3, but not anymore in 4.22.0. The decimal point (.) is not written to the buffer anymore [ASCII '46']).

As example here is the code from your documentation:

Unicode::UnicodeChar buffer[20];
Unicode::snprintfFloat(buffer, 20, "%#6.f", 3.14159f);
// buffer="    3."

Results:

4.21.3: "    3."   (as expected)                                                                                                                                    4.22.0: "    3"    (dot is missing)

1 REPLY 1
Yoann KLEIN
ST Employee

Hello @PBull,

Indeed, I also manage to reproduce this between 4.21.4 and 4.22.0.

I'll report it to the team.

Thanks for the input :)

Yoann KLEIN
ST Software Developer | TouchGFX