diff --git a/util/logging.cc b/util/logging.cc index ca6b324..d48b6dd 100644 --- a/util/logging.cc +++ b/util/logging.cc @@ -52,7 +52,8 @@ bool ConsumeDecimalNumber(Slice* in, uint64_t* val) { char c = (*in)[0]; if (c >= '0' && c <= '9') { ++digits; - const int delta = (c - '0'); + // |delta| intentionally unit64_t to avoid Android crash (see log). + const uint64_t delta = (c - '0'); static const uint64_t kMaxUint64 = ~static_cast(0); if (v > kMaxUint64/10 || (v == kMaxUint64/10 && delta > kMaxUint64%10)) {