about summary refs log tree commit diff
path: root/stdio/vfscanf.c
diff options
context:
space:
mode:
Diffstat (limited to 'stdio/vfscanf.c')
-rw-r--r--stdio/vfscanf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/stdio/vfscanf.c b/stdio/vfscanf.c
index cacf16f466..cdfedc2485 100644
--- a/stdio/vfscanf.c
+++ b/stdio/vfscanf.c
@@ -251,7 +251,7 @@ DEFUN(__vfscanf, (s, format, arg),
 
 	case 'n':	/* Answer number of assignments done.  */
 	  if (do_assign)
-	    *ARG (int *) = read_in;
+	    *ARG (int *) = read_in - 1;	/* Don't count the read-ahead.  */
 	  break;
 
 	case 'c':	/* Match characters.  */