Skip to main content
PBull
Associate II
September 10, 2023
Question

Unicode::snprintfFloat partly broken in 4.22

  • September 10, 2023
  • 1 reply
  • 920 views

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)

This topic has been closed for replies.

1 reply

Yoann KLEIN
ST Employee
September 11, 2023

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 KLEINST Software Developer | TouchGFX