diff options
author | Mike Buland <mike@xagasoft.com> | 2014-10-30 13:15:19 -0600 |
---|---|---|
committer | Mike Buland <mike@xagasoft.com> | 2014-10-30 13:15:19 -0600 |
commit | 7026b96ec807b169f7b413056e52412ae422ea9d (patch) | |
tree | 9a597b31b8c7d6a8781b45d1bbf27c258bb6a3a4 /src/parser.cpp | |
parent | 18a2be05bfacddcb7398f1b197bd1a5876c9a0cb (diff) | |
download | clic-7026b96ec807b169f7b413056e52412ae422ea9d.tar.gz clic-7026b96ec807b169f7b413056e52412ae422ea9d.tar.bz2 clic-7026b96ec807b169f7b413056e52412ae422ea9d.tar.xz clic-7026b96ec807b169f7b413056e52412ae422ea9d.zip |
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.
Diffstat (limited to '')
-rw-r--r-- | src/parser.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
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() | |||
232 | { | 232 | { |
233 | Token b = tsTerminal.peekPop(); | 233 | Token b = tsTerminal.peekPop(); |
234 | Token a = tsTerminal.peekPop(); | 234 | Token a = tsTerminal.peekPop(); |
235 | Number *pProduct = new Number( deref(a) * deref(b) ); | ||
236 | pProduct->setScale( lex.getScale() ); | ||
235 | tsTerminal.push( | 237 | tsTerminal.push( |
236 | Token( Token::tNumber, | 238 | Token( Token::tNumber, |
237 | new Number( deref(a) * deref(b) ) | 239 | pProduct |
238 | ) | 240 | ) |
239 | ); | 241 | ); |
240 | } | 242 | } |