summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--bignum.c2
2 files changed, 7 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 12e0016319..a5b0d13281 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+Tue Jun 25 12:42:57 2013 Tanaka Akira <[email protected]>
+
+ * bignum.c (integer_unpack_single_bdigit): Use "1 + ~u" instead of
+ "-u" to suppress warning (C4146) by Visual Studio.
+ Reported by ko1 via IRC.
+
Tue Jun 25 12:28:57 2013 Tanaka Akira <[email protected]>
* bignum.c (big2ulong): Add code specialized for SIZEOF_LONG <=
diff --git a/bignum.c b/bignum.c
index 697d833299..53a9ad5c8a 100644
--- a/bignum.c
+++ b/bignum.c
@@ -1351,7 +1351,7 @@ integer_unpack_single_bdigit(BDIGIT u, size_t size, int flags, BDIGIT *dp)
((u >> (size * CHAR_BIT - 1)) ? -1 : 1);
if (sign < 0) {
u |= LSHIFTX(BDIGMAX, size * CHAR_BIT);
- u = BIGLO(-u);
+ u = BIGLO(1 + ~u);
}
}
else