From dcc357b948a535cc254168aaed7aa67e874efec8 Mon Sep 17 00:00:00 2001 From: pedro martelletto Date: Thu, 11 Dec 2014 14:36:55 +0100 Subject: [PATCH] correctly set nread when parsing floats fixes a botch up by yours truly that broke scanf() with %n after %f in 6659d2ba. i blame immigrants on benefits. ok natano@ marco@ haesbaert@ --- lib/libc/stdio/vfscanf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/libc/stdio/vfscanf.c b/lib/libc/stdio/vfscanf.c index aa81e8d8763..4549287588c 100644 --- a/lib/libc/stdio/vfscanf.c +++ b/lib/libc/stdio/vfscanf.c @@ -793,7 +793,7 @@ again: c = *fmt++; } nassigned++; } - nread += p - buf; + nread += nr; break; #endif /* FLOATING_POINT */ }