about summary refs log tree commit diff
path: root/stdio-common/vfscanf-internal.c
diff options
context:
space:
mode:
Diffstat (limited to 'stdio-common/vfscanf-internal.c')
-rw-r--r--stdio-common/vfscanf-internal.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/stdio-common/vfscanf-internal.c b/stdio-common/vfscanf-internal.c
index 4fec12345c..d9675bd4b1 100644
--- a/stdio-common/vfscanf-internal.c
+++ b/stdio-common/vfscanf-internal.c
@@ -1428,6 +1428,16 @@ __vfscanf_internal (FILE *s, const char *format, va_list argptr,
 		      c = inchar ();
 		    }
 		}
+	      else if ((mode_flags & SCANF_ISOC23_BIN_CST) != 0
+		       && base == 0
+		       && width != 0
+		       && TOLOWER (c) == L_('b'))
+		{
+		  base = 2;
+		  if (width > 0)
+		    --width;
+		  c = inchar ();
+		}
 	      else if (base == 0)
 		base = 8;
 	    }