URL:
<http://savannah.nongnu.org/bugs/?35366>
Summary: Bad behaviour for fprintf_P function
Project: AVR C Runtime Library
Submitted by: espitall
Submitted on: mer. 25 janv. 2012 13:28:32 GMT
Category: Library
Severity: 3 - Normal
Priority: 5 - Normal
Item Group: libc code
Status: None
Percent Complete: 0%
Assigned to: None
Open/Closed: Open
Discussion Lock: Any
Release: 1.7.1
Fixed Release: None
_______________________________________________________
Details:
In order to print a single '%' character with fprintf_P, I must put %%%% in my
format string.
A string format "e1=%f %% e2=%f" seems to be interpreted as if I wrote "e1=%f
% e2=%f" (which create a false %e token and corrupt my output)
It seems that the string format is parsed twice, so the only way I found to
have my single % is to add two extra %
The vnsprintf function has the same bug (but not the simple printf function)
I use the 1.7.1 version provided by atmel but I didn't see any trace of this
bug in changelog of newer versions.
_______________________________________________________
Reply to this item at:
<http://savannah.nongnu.org/bugs/?35366>
_______________________________________________
Message posté via/par Savannah
http://savannah.nongnu.org/
_______________________________________________
AVR-libc-dev mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/avr-libc-dev