[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [avr-libc-dev] sscanf problem
From: |
Joerg Wunsch |
Subject: |
Re: [avr-libc-dev] sscanf problem |
Date: |
Fri, 9 Apr 2004 16:17:49 +0200 |
User-agent: |
Mutt/1.2.5i |
As Kang Tin LAI wrote:
> sscanf(qstrg, "00=%u&01=%u&02=%u&03=%u&" \
> "04=%u&05=%u&06=%u&07=%u&" \
> "08=%u&09=%u&0a=%u&0b=%u&" \
> "0c=%x&0d=%x&0e=%x&0f=%x&10=%x&11=%x", \
The %u format didn't work until a few days ago, i. e. all released
versions of avr-libc do still have an erroneous implementation of it.
> aap, aap + 1, aap + 2, aap + 3, \
> aap + 4, aap + 5, aap + 6, aap + 7, \
> aap + 8, aap + 9, aap + 10, aap + 11, \
> &mac[0], &mac[1], &mac[2], &mac[3], &mac[4], &mac[5]);
> The *(aap + 12), ie., addr[24] and addr[25], and mac[6] are changed by sscanf
> unexpectly. So addr[24] and mac[6] will crash, use addr[26] and mac[7] to
> bypass
> this problem.
Can you try compiling the latest version from CVS, and see whether the
problem still exists with that version? If it still fails, it must be
a general problem with the way the compiler handles long variadic
argument lists. I guess this feature has only been rarely tested so
far, since it is not frequently used.
--
J"org Wunsch Unix support engineer
address@hidden http://www.interface-systems.de/~j/