r15455 - gnucash/trunk/src/gnome-utils - Correct return value of zero-loop list, preventing malloc(-1).
Josh Sled
jsled at cvs.gnucash.org
Sun Jan 28 16:24:31 EST 2007
Author: jsled
Date: 2007-01-28 16:24:30 -0500 (Sun, 28 Jan 2007)
New Revision: 15455
Trac: http://svn.gnucash.org/trac/changeset/15455
Modified:
gnucash/trunk/src/gnome-utils/gnc-dense-cal-store.c
Log:
Correct return value of zero-loop list, preventing malloc(-1).
Modified: gnucash/trunk/src/gnome-utils/gnc-dense-cal-store.c
===================================================================
--- gnucash/trunk/src/gnome-utils/gnc-dense-cal-store.c 2007-01-28 21:11:06 UTC (rev 15454)
+++ gnucash/trunk/src/gnome-utils/gnc-dense-cal-store.c 2007-01-28 21:24:30 UTC (rev 15455)
@@ -187,7 +187,7 @@
*trans->cal_marks[i++] = date;
xaccFreqSpecGetNextInstance(fs, &date, &date);
}
- trans->num_real_marks = (i-1);
+ trans->num_real_marks = (i == 0 ? 0 : (i-1));
g_signal_emit_by_name(trans, "update", GUINT_TO_POINTER(1));
}
More information about the gnucash-changes
mailing list