mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
bug fix -- the RND_NEVER flag was being ignored
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@10123 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
4088394502
commit
812fbb094f
@ -730,6 +730,8 @@ gnc_numeric_convert(gnc_numeric in, gint64 denom, gint how)
|
|||||||
* the reciprocal of its magnitude. */
|
* the reciprocal of its magnitude. */
|
||||||
if(denom < 0)
|
if(denom < 0)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
/* XXX FIXME: use 128-bit math here ... */
|
||||||
denom = - denom;
|
denom = - denom;
|
||||||
denom_neg = 1;
|
denom_neg = 1;
|
||||||
temp_a = (in.num < 0) ? -in.num : in.num;
|
temp_a = (in.num < 0) ? -in.num : in.num;
|
||||||
@ -766,9 +768,10 @@ gnc_numeric_convert(gnc_numeric in, gint64 denom, gint how)
|
|||||||
out.denom = denom;
|
out.denom = denom;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(remainder > 0)
|
if (remainder)
|
||||||
{
|
{
|
||||||
switch(how) {
|
switch(how & GNC_NUMERIC_RND_MASK)
|
||||||
|
{
|
||||||
case GNC_HOW_RND_FLOOR:
|
case GNC_HOW_RND_FLOOR:
|
||||||
if(sign < 0) {
|
if(sign < 0) {
|
||||||
out.num = out.num + 1;
|
out.num = out.num + 1;
|
||||||
|
Loading…
Reference in New Issue
Block a user