r15143 - gnucash/branches/gda-dev/lib/libqof/qof - Fix bug where kvp_frame_add_numeric() (and other routines) wouldn't
Phil Longstaff
plongstaff at cvs.gnucash.org
Sat Nov 25 23:06:58 EST 2006
Author: plongstaff
Date: 2006-11-25 23:06:57 -0500 (Sat, 25 Nov 2006)
New Revision: 15143
Trac: http://svn.gnucash.org/trac/changeset/15143
Modified:
gnucash/branches/gda-dev/lib/libqof/qof/kvp_frame.c
Log:
Fix bug where kvp_frame_add_numeric() (and other routines) wouldn't
create the kvp path if it didn't exist.
Modified: gnucash/branches/gda-dev/lib/libqof/qof/kvp_frame.c
===================================================================
--- gnucash/branches/gda-dev/lib/libqof/qof/kvp_frame.c 2006-11-24 19:54:38 UTC (rev 15142)
+++ gnucash/branches/gda-dev/lib/libqof/qof/kvp_frame.c 2006-11-26 04:06:57 UTC (rev 15143)
@@ -512,6 +512,7 @@
{
char *key = NULL;
KvpValue *oldvalue;
+ KvpFrame* orig_frame = frame;
frame = (KvpFrame *) get_trailer_or_null (frame, path, &key);
oldvalue = kvp_frame_get_slot (frame, key);
@@ -544,6 +545,7 @@
/* Hmm, if we are here, the path doesn't exist. We need to
* create the path, add the value to it. */
+ frame = orig_frame;
frame = kvp_frame_set_value_nc (frame, path, value);
LEAVE ("new frame=%s", kvp_frame_to_string(frame));
return frame;
More information about the gnucash-changes
mailing list