Index: runtime/vm/object.cc |
diff --git a/runtime/vm/object.cc b/runtime/vm/object.cc |
index cbe16025761d7a41c0224e8358fd7f917f66653a..a76f860431fb577b8b5fedb53164c041a0071223 100644 |
--- a/runtime/vm/object.cc |
+++ b/runtime/vm/object.cc |
@@ -17629,8 +17629,8 @@ RawBigint* Bigint::New(bool neg, intptr_t used, const TypedData& digits, |
--used; |
} |
if (used > 0) { |
- if ((used & 1) != 0) { |
- // Set leading zero for 64-bit processing of digit pairs. |
+ if (((used & 1) != 0) && (digits.GetUint32(used << 2) != 0)) { |
+ // Set leading zero for 64-bit processing of digit pairs if not set. |
regis
2016/02/11 23:38:11
I would add a comment explaining that we avoid a w
siva
2016/02/11 23:57:24
Done.
|
digits.SetUint32(used << 2, 0); |
} |
result.set_digits(digits); |