Chromium Code Reviews| Index: runtime/vm/bigint_operations.cc |
| diff --git a/runtime/vm/bigint_operations.cc b/runtime/vm/bigint_operations.cc |
| index 71b593bdb4b436199afa7116bd5e84bab1b39802..0de6a96633a7ba039319c2e70855944a12eff303 100644 |
| --- a/runtime/vm/bigint_operations.cc |
| +++ b/runtime/vm/bigint_operations.cc |
| @@ -390,8 +390,11 @@ const char* BigintOperations::ToDecimalCString( |
| Bigint& remainder = Bigint::Handle(); |
| while (!rest.IsZero()) { |
| DivideRemainder(rest, divisor, "ient, &remainder); |
| - ASSERT(remainder.Length() == 1); |
| - intptr_t part = static_cast<intptr_t>(remainder.GetChunkAt(0)); |
| + ASSERT(remainder.Length() <= 1); |
| + intptr_t part = 0; |
|
kasperl
2012/03/07 12:47:01
intptr_t part = (remainder.Length() == 1)
? sta
floitsch
2012/03/07 12:51:26
Done.
|
| + if (remainder.Length() == 1) { |
| + part = static_cast<intptr_t>(remainder.GetChunkAt(0)); |
| + } |
| for (int i = 0; i < kPowerOfTen; i++) { |
| result[result_pos++] = '0' + (part % 10); |
| part /= 10; |