diff --git a/src/IO/readDecimalText.h b/src/IO/readDecimalText.h index f552ec9e531..44405357a10 100644 --- a/src/IO/readDecimalText.h +++ b/src/IO/readDecimalText.h @@ -161,7 +161,9 @@ inline void readDecimalText(ReadBuffer & buf, T & x, uint32_t precision, uint32_ if (static_cast(scale) + exponent < 0) { /// Too many digits after point. Just cut off excessive digits. - x.value /= intExp10OfSize(-exponent - static_cast(scale)); + auto divisor = intExp10OfSize(-exponent - static_cast(scale)); + assert(divisor > 0); /// This is for Clang Static Analyzer. It is not smart enough to infer it automatically. + x.value /= divisor; scale = 0; return; }