[uClibc]Unexpected behaviour of sscanf

Marko Ebert Marko.Ebert at email.si
Thu May 9 13:18:14 UTC 2002


Hello!

I've encountered somewhat unexpected behaviour in uClibc's sscanf. The 
code...
   char a[10]="ABCDEF";
   char b[10]="AB-10";
   char c[10];
   int i;
   sscanf(a,"AB%s",c);
   sscanf(b,"AB%d",&i);
   printf("%s %d",c,i);
under uClibc outputs
   DEF 10
while under glibc
   CDEF -10

I'm using a CVS version of uClibc from a day or two ago. Is this a bug 
that has been fixed or is it new? I think that in 0.9.10 this worked 
ok... not sure though...
btw. I didn't check scanf or fscanf, but...

/M




More information about the uClibc mailing list