Bug #586805: Fix errorneous abs() in csv import

Changes abs function to fabs in gnc-csv-model.c, to allow csv imports of values
less than $1.00.

Patch by James Raehl.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@19122 57a11ea4-9604-0410-9ed3-97b8803252fd
pull/1/head
Christian Stimming 16 years ago
parent 7d19c08d6e
commit ced3775bbf

@ -20,6 +20,7 @@
#include <unistd.h>
#include <fcntl.h>
#include <stdlib.h>
#include <math.h>
#include <time.h>
#ifndef HAVE_LOCALTIME_R
#include "localtime_r.h"
@ -683,7 +684,8 @@ static gboolean trans_property_set(TransProperty* prop, char* str)
g_free(str_dupe);
if (abs(value) > 0.00001)
/* Change abs to fabs, to fix bug 586805 */
if (fabs(value) > 0.00001)
{
prop->value = g_new(gnc_numeric, 1);
*((gnc_numeric*)(prop->value)) =

Loading…
Cancel
Save