diff --git a/src/num.c b/src/num.c index 6131034a..12be9c95 100644 --- a/src/num.c +++ b/src/num.c @@ -2138,7 +2138,7 @@ size_t bc_num_len(const BcNum *restrict n) { size_t len = n->len; - if (BC_NUM_ZERO(n)) return n->scale ? n->scale : 1; + if (BC_NUM_ZERO(n)) return n->scale; if (BC_NUM_RDX_VAL(n) == len) { diff --git a/tests/bc/length_results.txt b/tests/bc/length_results.txt index 3501dea2..85267e2f 100644 --- a/tests/bc/length_results.txt +++ b/tests/bc/length_results.txt @@ -1,4 +1,4 @@ -1 +0 4 8 11