diff options
author | Mike Buland <mike@xagasoft.com> | 2014-09-17 08:50:36 -0600 |
---|---|---|
committer | Mike Buland <mike@xagasoft.com> | 2014-09-17 08:50:36 -0600 |
commit | 3ada65d36621787f8dd103e9ae19083ef3c1df5b (patch) | |
tree | 75dbdbe115bfa83923ccbf50bddf6d3e5574a2cd /src/number.cpp | |
parent | abe7e449143052b07fae688da690c2a7d387a291 (diff) | |
download | clic-3ada65d36621787f8dd103e9ae19083ef3c1df5b.tar.gz clic-3ada65d36621787f8dd103e9ae19083ef3c1df5b.tar.bz2 clic-3ada65d36621787f8dd103e9ae19083ef3c1df5b.tar.xz clic-3ada65d36621787f8dd103e9ae19083ef3c1df5b.zip |
Issues with small decimal numbers were in toString.
It was bailing on very small numbers with only one decimal point of
precision, which is silly. This has been fixed.
Diffstat (limited to '')
-rw-r--r-- | src/number.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/number.cpp b/src/number.cpp index 1b0efdc..0b8e07b 100644 --- a/src/number.cpp +++ b/src/number.cpp | |||
@@ -541,7 +541,7 @@ Bu::String Number::toString() const | |||
541 | { | 541 | { |
542 | int iSigDig = iScale-1; | 542 | int iSigDig = iScale-1; |
543 | for( ; iSigDig >= 0 && aFrac.get( iSigDig ) == 0; iSigDig-- ) { } | 543 | for( ; iSigDig >= 0 && aFrac.get( iSigDig ) == 0; iSigDig-- ) { } |
544 | if( aInt.getSize() == 0 && iSigDig <= 0 ) | 544 | if( aInt.getSize() == 0 && iSigDig < 0 ) |
545 | return "0"; | 545 | return "0"; |
546 | Bu::String sRet; | 546 | Bu::String sRet; |
547 | if( !bPositive ) | 547 | if( !bPositive ) |