diff options
author | hobbs <hobbs> | 2002-02-07 01:50:46 (GMT) |
---|---|---|
committer | hobbs <hobbs> | 2002-02-07 01:50:46 (GMT) |
commit | c11c702cfe6d98893a8ac09baefbf98a868f6b32 (patch) | |
tree | ac7ba1869a3d670c5a17aa2a7643447233e371e7 /generic/tclScan.c | |
parent | e844a773cbc0756b3cb28059a223fb56ddad5186 (diff) | |
download | tcl-c11c702cfe6d98893a8ac09baefbf98a868f6b32.zip tcl-c11c702cfe6d98893a8ac09baefbf98a868f6b32.tar.gz tcl-c11c702cfe6d98893a8ac09baefbf98a868f6b32.tar.bz2 |
* tests/scan.test:
* generic/tclScan.c (Tcl_ScanObjCmd): corrected scan 0x... %x
handling that didn't accept the 0x as a prelude to a base 16
number. [Bug #495213]
Diffstat (limited to 'generic/tclScan.c')
-rw-r--r-- | generic/tclScan.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/generic/tclScan.c b/generic/tclScan.c index 23483e7..4dea57a 100644 --- a/generic/tclScan.c +++ b/generic/tclScan.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclScan.c,v 1.8 2001/09/20 01:03:08 hobbs Exp $ + * RCS: @(#) $Id: tclScan.c,v 1.9 2002/02/07 01:50:46 hobbs Exp $ */ #include "tclInt.h" @@ -855,12 +855,19 @@ Tcl_ScanObjCmd(dummy, interp, objc, objv) * a number. If we are unsure of the base, it * indicates that we are in base 8 or base 16 (if it is * followed by an 'x'). + * + * 8.1 - 8.3.4 incorrectly handled 0x... base-16 + * cases for %x by not reading the 0x as the + * auto-prelude for base-16. [Bug #495213] */ case '0': if (base == 0) { base = 8; flags |= SCAN_XOK; } + if (base == 16) { + flags |= SCAN_XOK; + } if (flags & SCAN_NOZERO) { flags &= ~(SCAN_SIGNOK | SCAN_NODIGITS | SCAN_NOZERO); |