summaryrefslogtreecommitdiffstats
path: root/generic/tclStringObj.c
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2017-04-12 13:15:39 (GMT)
committerdgp <dgp@users.sourceforge.net>2017-04-12 13:15:39 (GMT)
commit62b2b9bf4592ef78dc71f0bbdbdbaafea3a58713 (patch)
treec5a9e0ad2576f39258b4e7e9b5409ca6052b1bb0 /generic/tclStringObj.c
parente006ff39be1b45b0cd57c5b2e943e487dde786dd (diff)
parent244e69a10ad133c5b1b878b0a8bb22537625762e (diff)
downloadtcl-62b2b9bf4592ef78dc71f0bbdbdbaafea3a58713.zip
tcl-62b2b9bf4592ef78dc71f0bbdbdbaafea3a58713.tar.gz
tcl-62b2b9bf4592ef78dc71f0bbdbdbaafea3a58713.tar.bz2
Revert recent commit. TIP 237 is clear that %llu is invalid.
Diffstat (limited to 'generic/tclStringObj.c')
-rw-r--r--generic/tclStringObj.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/generic/tclStringObj.c b/generic/tclStringObj.c
index e51b98a..560c169 100644
--- a/generic/tclStringObj.c
+++ b/generic/tclStringObj.c
@@ -1939,6 +1939,11 @@ Tcl_AppendFormatToObj(
}
case 'u':
+ if (useBig) {
+ msg = "unsigned bignum format is invalid";
+ errCode = "BADUNSIGNED";
+ goto errorMsg;
+ }
case 'd':
case 'o':
case 'p':
@@ -1962,15 +1967,6 @@ Tcl_AppendFormatToObj(
goto error;
}
isNegative = (mp_cmp_d(&big, 0) == MP_LT);
- if (ch == 'u') {
- if (isNegative) {
- msg = "unsigned bignum format is invalid";
- errCode = "BADUNSIGNED";
- goto errorMsg;
- } else {
- ch = 'd';
- }
- }
#ifndef TCL_WIDE_INT_IS_LONG
} else if (useWide) {
if (Tcl_GetWideIntFromObj(NULL, segment, &w) != TCL_OK) {