| Index: runtime/vm/bigint_operations.cc
|
| diff --git a/runtime/vm/bigint_operations.cc b/runtime/vm/bigint_operations.cc
|
| index 71b593bdb4b436199afa7116bd5e84bab1b39802..5c633d01061dbf6ed2f193382ad3eb4c32c9cd20 100644
|
| --- a/runtime/vm/bigint_operations.cc
|
| +++ b/runtime/vm/bigint_operations.cc
|
| @@ -390,8 +390,10 @@ 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 = (remainder.Length() == 1)
|
| + ? static_cast<intptr_t>(remainder.GetChunkAt(0))
|
| + : 0;
|
| for (int i = 0; i < kPowerOfTen; i++) {
|
| result[result_pos++] = '0' + (part % 10);
|
| part /= 10;
|
|
|