summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--generic/tclObj.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/generic/tclObj.c b/generic/tclObj.c
index 1fd674f..029d3c0 100644
--- a/generic/tclObj.c
+++ b/generic/tclObj.c
@@ -2816,7 +2816,7 @@ Tcl_GetLongFromObj(
value = (value << CHAR_BIT) | *bytes++;
}
if (big.sign) {
- *longPtr = - (long) value;
+ *longPtr = (long) (0-value);
} else {
*longPtr = (long) value;
}
@@ -3116,7 +3116,7 @@ Tcl_GetWideIntFromObj(
value = (value << CHAR_BIT) | *bytes++;
}
if (big.sign) {
- *wideIntPtr = - (Tcl_WideInt) value;
+ *wideIntPtr = (Tcl_WideInt) (0-value);
} else {
*wideIntPtr = (Tcl_WideInt) value;
}