bugAVR C Runtime Library - Bugs: bug #11987, sscanf parsing problem : leading...

 
 

bug #11987: sscanf parsing problem : leading zero ignored in %u

Submitted by:  None
Submitted on:  Mon 14 Feb 2005 05:11:45 PM UTC  
 
Category: NoneSeverity: 3 - Normal
Priority: 5 - NormalItem Group: None
Status: FixedPercent Complete: 0%
Assigned to: Joerg Wunsch <joerg_wunsch>Originator Email: -unavailable-
Open/Closed: ClosedRelease: None
Fixed Release: None

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Tue 15 Feb 2005 11:23:26 AM UTC, comment #2:

ok,

Thank you

Christophe

Anonymous
Mon 14 Feb 2005 09:54:33 PM UTC, comment #1:

Thanks for reporting it, it turned out that leading signs and/
or 0/0x prefixes had not been accounted properly against any
field width constraints.

If you need it urgently, fetch the avr-libc-1_2-branch from
CVS and recompile, or obtain revision 1.9.2.1 of vfscanf.c,
and recompile the library. Otherwise, it will be made
available as part of the next avr-libc release (1.2.3).

Joerg Wunsch <joerg_wunsch>
Project AdministratorIn charge of this item.
Mon 14 Feb 2005 05:11:45 PM UTC, original submission:

hello

this code seems to give me wrong results :

char str[] = "$GPGGA,004331.66666";
int hh,mm,ss;

sscanf(str, "$GPGGA,%2u%2u%2u",&hh,&mm,&ss );

result when executed on a mega32, with normal scanf (no special option passed to the linker) :
hh = 4 instead of 0
mm = 33
ss = 1
and the scanf returns 3

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

Please enter the title of George Orwell's famous dystopian book (it's a date):

 

 

Follow 3 latest changes.

Date Changed By Updated Field Previous Value => Replaced By
Mon 14 Feb 2005 09:54:33 PM UTCjoerg_wunschStatusNone=>Fixed
  Open/ClosedOpen=>Closed
Mon 14 Feb 2005 08:41:55 PM UTCjoerg_wunschAssigned toNone=>joerg_wunsch

Back to the top


Powered by Savane 3.1-cleanup1