From 3ada65d36621787f8dd103e9ae19083ef3c1df5b Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Wed, 17 Sep 2014 08:50:36 -0600 Subject: 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. --- src/number.cpp | 2 +- src/parser.cpp | 2 +- 2 files changed, 2 insertions(+), 2 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 { int iSigDig = iScale-1; for( ; iSigDig >= 0 && aFrac.get( iSigDig ) == 0; iSigDig-- ) { } - if( aInt.getSize() == 0 && iSigDig <= 0 ) + if( aInt.getSize() == 0 && iSigDig < 0 ) return "0"; Bu::String sRet; if( !bPositive ) diff --git a/src/parser.cpp b/src/parser.cpp index cf3bb3f..607de8a 100644 --- a/src/parser.cpp +++ b/src/parser.cpp @@ -5,7 +5,7 @@ #include #include -#define DEBUG +//#define DEBUG Parser::Parser( Lexer &lex, Bu::Stream &rOut ) : lex( lex ), -- cgit v1.2.3