sscanf fails with %ud

I have basically this code :

1
2
3
4
char someVar[] = "11.1.0";
unsigned int m_Index;
int bit1,bit0;
sscanf(someVar,"%ud.%d.%d",&m_Index,&bit1,&bit0);


With "%d.%d.%d", sscanf parses my 3 arguments
But with "%ud.%d.%d", sscanf returns 1 and only the first variable is correctly parsed

Any ideas?
The code is %u, not %ud. %ud is failing because it's treating %u as the code, then is looking for a literal 'd' character in the source string, which it doesn't find.
Ah, stupid me, thanks !
Topic archived. No new replies allowed.