Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 22 Apr 2012 21:22:14 +0000 (UTC)
From:      David Schultz <das@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r234586 - head/lib/libc/stdio
Message-ID:  <201204222122.q3MLME3L059104@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: das
Date: Sun Apr 22 21:22:14 2012
New Revision: 234586
URL: http://svn.freebsd.org/changeset/base/234586

Log:
  Bugfix: %n doesn't count as a conversion, so
  sscanf("abc", "ab%ncd", &i) returns EOF, not 0.

Modified:
  head/lib/libc/stdio/vfscanf.c
  head/lib/libc/stdio/vfwscanf.c

Modified: head/lib/libc/stdio/vfscanf.c
==============================================================================
--- head/lib/libc/stdio/vfscanf.c	Sun Apr 22 21:18:41 2012	(r234585)
+++ head/lib/libc/stdio/vfscanf.c	Sun Apr 22 21:22:14 2012	(r234586)
@@ -703,7 +703,6 @@ literal:
 			break;
 
 		case 'n':
-			nconversions++;
 			if (flags & SUPPRESS)	/* ??? */
 				continue;
 			if (flags & SHORTSHORT)

Modified: head/lib/libc/stdio/vfwscanf.c
==============================================================================
--- head/lib/libc/stdio/vfwscanf.c	Sun Apr 22 21:18:41 2012	(r234585)
+++ head/lib/libc/stdio/vfwscanf.c	Sun Apr 22 21:22:14 2012	(r234586)
@@ -650,7 +650,6 @@ literal:
 			break;
 
 		case 'n':
-			nconversions++;
 			if (flags & SUPPRESS)	/* ??? */
 				continue;
 			if (flags & SHORTSHORT)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201204222122.q3MLME3L059104>