diff options
author | dgp <dgp@users.sourceforge.net> | 2016-10-12 13:46:14 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2016-10-12 13:46:14 (GMT) |
commit | 915c9e49675d816fa2018e7b3b35903264bfffb4 (patch) | |
tree | b3610140816d0eebd159e992178ec00f153d4365 | |
parent | 3c8ecbaacd225de1d9b971de37d2bbfd2f4f3bfe (diff) | |
download | tcl-915c9e49675d816fa2018e7b3b35903264bfffb4.zip tcl-915c9e49675d816fa2018e7b3b35903264bfffb4.tar.gz tcl-915c9e49675d816fa2018e7b3b35903264bfffb4.tar.bz2 |
[be003d570f] TclParseNumber() failed to fully implement TCL_PARSE_BINARY_ONLY.
-rw-r--r-- | generic/tclStrToD.c | 2 | ||||
-rw-r--r-- | tests/scan.test | 3 |
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 {} |