[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[avr-libc-dev] [bugs #11987] sscanf parsing problem : leading zero ignor
From: |
anonymous |
Subject: |
[avr-libc-dev] [bugs #11987] sscanf parsing problem : leading zero ignored in 134957472 |
Date: |
Mon, 14 Feb 2005 17:11:46 +0000 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.1; fr-FR; rv:1.7.3) Gecko/20040910 |
URL:
<http://savannah.nongnu.org/bugs/?func=detailitem&item_id=11987>
Summary: sscanf parsing problem : leading zero ignored in %u
Project: AVR C Runtime Library
Submitted by: None
Submitted on: lun 14.02.2005 à 17:11
Category: None
Severity: 5 - Average
Priority: 5 - Normal
Item Group: None
Status: None
Privacy: Public
Percent Complete: 0%
Assigned to: None
Originator Email: address@hidden
Open/Closed: Open
_______________________________________________________
Details:
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
_______________________________________________________
This item URL is:
<http://savannah.nongnu.org/bugs/?func=detailitem&item_id=11987>
_______________________________________________
Message posté via/par Savannah
http://savannah.nongnu.org/
- [avr-libc-dev] [bugs #11987] sscanf parsing problem : leading zero ignored in 134957472,
anonymous <=