summaryrefslogtreecommitdiffstats
path: root/usr.bin/dc
diff options
context:
space:
mode:
authorkevlo <kevlo@FreeBSD.org>2012-03-15 01:43:44 +0000
committerkevlo <kevlo@FreeBSD.org>2012-03-15 01:43:44 +0000
commit7e61ff80de94738c6951b8b54683c55ea157f528 (patch)
treee0408089373c811a6b82408bd767961962ab1a14 /usr.bin/dc
parent0e6c83a1b6b87a39b461e832ccb815fd2aa4ee76 (diff)
downloadFreeBSD-src-7e61ff80de94738c6951b8b54683c55ea157f528.zip
FreeBSD-src-7e61ff80de94738c6951b8b54683c55ea157f528.tar.gz
- Fix an erroneous invocation of the editline.
- Fix wrong scaling in the bc.library. - Let length(0.000) conform to what gnu bc does. PR: bin/159227 Submitted by: AIDA Shinra <shinra at j10n dot org>
Diffstat (limited to 'usr.bin/dc')
-rw-r--r--usr.bin/dc/bcode.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.bin/dc/bcode.c b/usr.bin/dc/bcode.c
index 024c7cc..022cf87 100644
--- a/usr.bin/dc/bcode.c
+++ b/usr.bin/dc/bcode.c
@@ -693,7 +693,7 @@ count_digits(const struct number *n)
u_int i;
if (BN_is_zero(n->number))
- return (1);
+ return (n->scale ? n->scale : 1);
int_part = new_number();
fract_part = new_number();
OpenPOWER on IntegriCloud