From 931512eff1113375732928a528774e401f52dcc5 Mon Sep 17 00:00:00 2001 From: Linas Vepstas Date: Thu, 4 Dec 1997 21:56:42 +0000 Subject: [PATCH] adjust fixes git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@285 57a11ea4-9604-0410-9ed3-97b8803252fd --- src/AdjBWindow.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/AdjBWindow.c b/src/AdjBWindow.c index 169c2171ad..c625151910 100644 --- a/src/AdjBWindow.c +++ b/src/AdjBWindow.c @@ -292,7 +292,7 @@ adjBOkCB( Widget mw, XtPointer cd, XtPointer cb ) acc->parent->saved = False; /* allocate mem for the new transaction */ - trans = (Transaction *)_malloc(sizeof(Transaction)); + trans = mallocTransaction(); /* Create the "trans" transaction */ str = XmTextGetString(adjBData->date); @@ -304,20 +304,19 @@ adjBOkCB( Widget mw, XtPointer cd, XtPointer cb ) themount = val; /* fill out the rest of the fields */ - trans->num = XtNewString(""); - trans->memo = XtNewString(""); + XtFree (trans->description); trans->description = XtNewString("Adjust Balance"); - trans->catagory = 0; trans->reconciled = NREC; pos = insertTransaction( acc, trans ); /* figure out what the amount for this transaction... figure out * the current balance, and take the diff from amount */ + dcurrAmount = 0.0; for( i=0; i