Messages in this thread | | | Date | Fri, 25 Sep 2009 10:42:03 +0000 | From | Andy Spencer <> | Subject | Re: [PATCH] fix %*s%n in sscanf |
| |
> > int end; > > char buf[] = "hello world"; > > sscanf(buf, "%*s%n", &end); > > printf("%d\n", end); > > Yeah, seems reasonable. So, without your patch, sscanf() in kernel > will ignore everything after '*', right?
Currently it ignores everything between '*' and whitespace. So '%*s%n' does not work, but '%*s %n' will correctly return the start of "world". [unhandled content-type:application/pgp-signature] | |