提交 1a4fcf66 编写于 作者: A Alexander Kuzmenkov

Fix formatting of minimal negative decimal

上级 e2dd6683
......@@ -870,14 +870,13 @@ String decimalFractional(const T & x, UInt32 scale)
template <typename T>
void writeText(Decimal<T> x, UInt32 scale, WriteBuffer & ostr)
{
if (x.value < 0)
T part = DecimalUtils::getWholePart(x, scale);
if (x.value < 0 && part == 0)
{
x.value *= -1;
writeChar('-', ostr); /// avoid crop leading minus when whole part is zero
}
T part = DecimalUtils::getWholePart(x, scale);
if constexpr (std::is_same_v<T, bInt256>)
writeText(part, ostr);
else
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册