summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--generic/tclStrToD.c2
-rw-r--r--tests/scan.test3
2 files changed, 4 insertions, 1 deletions
diff --git a/generic/tclStrToD.c b/generic/tclStrToD.c
index dc85124..6da6df3 100644
--- a/generic/tclStrToD.c
+++ b/generic/tclStrToD.c
@@ -630,7 +630,7 @@ TclParseNumber(
acceptPoint = p;
acceptLen = len;
if (c == 'x' || c == 'X') {
- if (flags & TCL_PARSE_OCTAL_ONLY) {
+ if (flags & (TCL_PARSE_OCTAL_ONLY|TCL_PARSE_BINARY_ONLY)) {
goto endgame;
}
state = ZERO_X;
diff --git a/tests/scan.test b/tests/scan.test
index d814ce9..7540c9c 100644
--- a/tests/scan.test
+++ b/tests/scan.test
@@ -538,6 +538,9 @@ test scan-5.14 {integer scanning} {
test scan-5.15 {Bug be003d570f} {
scan 0x40 %o
} 0
+test scan-5.16 {Bug be003d570f} {
+ scan 0x40 %b
+} 0
test scan-6.1 {floating-point scanning} -setup {
set a {}; set b {}; set c {}; set d {}