mirror of
https://github.com/fmtlib/fmt.git
synced 2025-11-28 05:09:44 +01:00
Fix handling of zero precision
This commit is contained in:
@@ -610,7 +610,7 @@ struct fixed_handler {
|
||||
uint64_t error, int, bool integral) {
|
||||
FMT_ASSERT(remainder < divisor, "");
|
||||
buf[size++] = digit;
|
||||
if (size != precision) return digits::more;
|
||||
if (size < precision) return digits::more;
|
||||
if (!integral) {
|
||||
// Check if error * 2 < divisor with overflow prevention.
|
||||
// The check is not needed for the integral part because error = 1
|
||||
|
||||
Reference in New Issue
Block a user