gnucash maint: Multiple changes pushed
John Ralls
jralls at code.gnucash.org
Tue May 14 13:18:35 EDT 2019
Updated via https://github.com/Gnucash/gnucash/commit/217418bb (commit)
via https://github.com/Gnucash/gnucash/commit/f905467a (commit)
from https://github.com/Gnucash/gnucash/commit/6b0f3ce6 (commit)
commit 217418bb8c30cea5921d4f2517460b7bafb6609a
Merge: 6b0f3ce64 f905467a4
Author: John Ralls <jralls at ceridwen.us>
Date: Tue May 14 10:09:16 2019 -0700
Merge Adrián Panella's 'numeric' into maint.
commit f905467a443f44897c60614e9f9149336f7eae3c
Author: Adrian Panella <ianchi74 at outlook.com>
Date: Mon May 13 23:05:11 2019 -0500
[numeric] Fix constructor from strings in range (0 ,1)
Fix error that caused strings in the form 0.nnn to be
converted to negative numerics.
diff --git a/libgnucash/engine/gnc-numeric.cpp b/libgnucash/engine/gnc-numeric.cpp
index a2e6c2a49..a2cbf6d1c 100644
--- a/libgnucash/engine/gnc-numeric.cpp
+++ b/libgnucash/engine/gnc-numeric.cpp
@@ -178,7 +178,7 @@ GncNumeric::GncNumeric(const std::string& str, bool autoround)
GncInt128 high(stoll(m[1].str()));
GncInt128 low(stoll(m[2].str()));
int64_t d = powten(m[2].str().length());
- GncInt128 n = high * d + (high > 0 ? low : -low);
+ GncInt128 n = high * d + (high >= 0 ? low : -low);
if (!autoround && n.isBig())
{
std::ostringstream errmsg;
Summary of changes:
libgnucash/engine/gnc-numeric.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
More information about the gnucash-changes
mailing list