From 7026b96ec807b169f7b413056e52412ae422ea9d Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Thu, 30 Oct 2014 13:15:19 -0600 Subject: The new division works great! Other minor bug fixes including scale issues, digit() access stopped a digit before the final possible digit in the scale, >, >=, <, <= all work correctly with mixed scale numbers now, probably other fixes. --- src/parser.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/parser.cpp') diff --git a/src/parser.cpp b/src/parser.cpp index 607de8a..8675a7c 100644 --- a/src/parser.cpp +++ b/src/parser.cpp @@ -232,9 +232,11 @@ void Parser::unwind() { Token b = tsTerminal.peekPop(); Token a = tsTerminal.peekPop(); + Number *pProduct = new Number( deref(a) * deref(b) ); + pProduct->setScale( lex.getScale() ); tsTerminal.push( Token( Token::tNumber, - new Number( deref(a) * deref(b) ) + pProduct ) ); } -- cgit v1.2.3