summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--generic/tclObj.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/generic/tclObj.c b/generic/tclObj.c
index d1af60d..693f7c9 100644
--- a/generic/tclObj.c
+++ b/generic/tclObj.c
@@ -3158,10 +3158,7 @@ TclGetWideBitsFromObj(
while (numBytes-- > 0) {
value = (value << CHAR_BIT) | *bytes++;
}
- if (big.sign) {
- value = -value;
- }
- *wideIntPtr = (Tcl_WideInt) value;
+ *wideIntPtr = !big.sign ? (Tcl_WideInt)value : -(Tcl_WideInt)value;
mp_clear(&big);
return TCL_OK;
}