[En-Nut-Discussion] Problem with sscanf() function!

Tomasz Niewęgłowski tomuro at wp.pl
Fri Jun 13 09:30:58 CEST 2003


I have some problems with sscanf() function. This function returns me wrong
data.

There is fragment of my code:

char buffer[] = {"+130 2\n"};

int ktory;
int ile;

...

ile = sscanf( buffer, "+130 %d", &ktory);

sscanf() returns me 0 (ile = 0) and 128 as a "ktory" variable (ktory = 128)
even if I changed second element in buffer.

I use 3.0.1 version of Nut software and WinAvr 3.3 compiler.

Tomuro




More information about the En-Nut-Discussion mailing list