Skip to content

Commit e14e409

Browse files
authored
Fix miscounting %n ?
1 parent 1226eb7 commit e14e409

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libc/stdio/vcscanf.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -485,7 +485,7 @@ int __vcscanf(int callback(void *), //
485485
continue;
486486
ReportConsumed:
487487
n_ptr = va_arg(va, int *);
488-
*n_ptr = consumed - 1; // minus lookahead
488+
*n_ptr = consumed;
489489
continue;
490490
DecodeString:
491491
bufsize = !width ? 32 : rawmode ? width : width + 1;

0 commit comments

Comments
 (0)