summaryrefslogtreecommitdiffstats
path: root/generic/tclUtil.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2019-10-30 21:34:02 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2019-10-30 21:34:02 (GMT)
commit5ae87ec20df1d7c0029694f15837f9634117a5b8 (patch)
tree6e21bb4b7df5f14e1fe55cd0dabb8e45767bc960 /generic/tclUtil.c
parent24a5107484c12a34a855d444aa9b8e26b4ec252a (diff)
parente52ace05d39636e857f167ed51382cbfbbd22687 (diff)
downloadtcl-5ae87ec20df1d7c0029694f15837f9634117a5b8.zip
tcl-5ae87ec20df1d7c0029694f15837f9634117a5b8.tar.gz
tcl-5ae87ec20df1d7c0029694f15837f9634117a5b8.tar.bz2
Merge 8.6
Diffstat (limited to 'generic/tclUtil.c')
-rw-r--r--generic/tclUtil.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/generic/tclUtil.c b/generic/tclUtil.c
index 5c51216..9216380 100644
--- a/generic/tclUtil.c
+++ b/generic/tclUtil.c
@@ -3728,7 +3728,7 @@ GetWideForIndex(
/* objPtr holds an integer outside the signed wide range */
/* Truncate to the signed wide range. */
- *widePtr = (((mp_int *)cd)->sign != MP_ZPOS) ? WIDE_MIN : WIDE_MAX;
+ *widePtr = ((mp_isneg((mp_int *)cd)) ? WIDE_MIN : WIDE_MAX);
return TCL_OK;
}
@@ -3841,7 +3841,7 @@ GetWideForIndex(
} else {
/* sum holds an integer outside the signed wide range */
/* Truncate to the signed wide range. */
- if (((mp_int *)cd)->sign != MP_ZPOS) {
+ if (mp_isneg((mp_int *)cd)) {
*widePtr = WIDE_MIN;
} else {
*widePtr = WIDE_MAX;
@@ -3988,7 +3988,7 @@ GetEndOffsetFromObj(
if (t == TCL_NUMBER_BIG) {
/* Truncate to the signed wide range. */
- if (((mp_int *)cd)->sign != MP_ZPOS) {
+ if (mp_isneg((mp_int *)cd)) {
offset = (bytes[3] == '-') ? WIDE_MAX : WIDE_MIN;
} else {
offset = (bytes[3] == '-') ? WIDE_MIN : WIDE_MAX;