summaryrefslogtreecommitdiffstats
path: root/generic/tclStringObj.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2017-04-28 08:00:51 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2017-04-28 08:00:51 (GMT)
commit2f5a766c71b1796f47a58123f17c3242b607feca (patch)
tree6e85f7dd2b98f0c060086540c153617c8b70ae9d /generic/tclStringObj.c
parentea1a2f3fbf4607b58ceffe3606b2d2e7e59e609f (diff)
parent2bf6ae09b3ac48095177c0f52735fb9bfa10f164 (diff)
downloadtcl-2f5a766c71b1796f47a58123f17c3242b607feca.zip
tcl-2f5a766c71b1796f47a58123f17c3242b607feca.tar.gz
tcl-2f5a766c71b1796f47a58123f17c3242b607feca.tar.bz2
merge core-8-6-branch
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 6cce073..4e19750 100644
--- a/generic/tclStringObj.c
+++ b/generic/tclStringObj.c
@@ -1943,6 +1943,11 @@ Tcl_AppendFormatToObj(
}
case 'u':
+ if (useBig) {
+ msg = "unsigned bignum format is invalid";
+ errCode = "BADUNSIGNED";
+ goto errorMsg;
+ }
case 'd':
case 'o':
case 'x':
@@ -1960,15 +1965,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) {