summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authorhobbs <hobbs@noemail.net>2002-02-07 01:50:46 (GMT)
committerhobbs <hobbs@noemail.net>2002-02-07 01:50:46 (GMT)
commit0c266f2183e83ccf891f58b150c0674376500a00 (patch)
treeac7ba1869a3d670c5a17aa2a7643447233e371e7 /generic
parent5c2ab363b9d297bdb7722145c5c34da8502b44df (diff)
downloadtcl-0c266f2183e83ccf891f58b150c0674376500a00.zip
tcl-0c266f2183e83ccf891f58b150c0674376500a00.tar.gz
tcl-0c266f2183e83ccf891f58b150c0674376500a00.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] FossilOrigin-Name: 003ecd26bac43398fa149d53840683b81f043807
Diffstat (limited to 'generic')
-rw-r--r--generic/tclScan.c9
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);