r19758 - gnucash/trunk/src/engine - Really fix error in sx_get_num_occur for SX which are limited by num_occur.

Christian Stimming cstim at code.gnucash.org
Fri Nov 5 17:49:17 EDT 2010


Author: cstim
Date: 2010-11-05 17:49:17 -0400 (Fri, 05 Nov 2010)
New Revision: 19758
Trac: http://svn.gnucash.org/trac/changeset/19758

Modified:
   gnucash/trunk/src/engine/SchedXaction.c
Log:
Really fix error in sx_get_num_occur for SX which are limited by num_occur.

Follow-up to r19757 which was incomplete. Hopefully I now really got everything.

Modified: gnucash/trunk/src/engine/SchedXaction.c
===================================================================
--- gnucash/trunk/src/engine/SchedXaction.c	2010-11-05 21:36:58 UTC (rev 19757)
+++ gnucash/trunk/src/engine/SchedXaction.c	2010-11-05 21:49:17 UTC (rev 19758)
@@ -717,7 +717,7 @@
     {
         /* SX has never occurred so far */
         gnc_sx_incr_temporal_state (sx, tmpState);
-        if (xaccSchedXactionHasOccurDef(sx) && tmpState->num_occur_rem <= 0)
+        if (xaccSchedXactionHasOccurDef(sx) && tmpState->num_occur_rem < 0)
         {
             gnc_sx_destroy_temporal_state (tmpState);
             return result;
@@ -730,7 +730,7 @@
     while (g_date_compare(&tmpState->last_date, start_date) < 0)
     {
         gnc_sx_incr_temporal_state (sx, tmpState);
-        if (xaccSchedXactionHasOccurDef(sx) && tmpState->num_occur_rem <= 0)
+        if (xaccSchedXactionHasOccurDef(sx) && tmpState->num_occur_rem < 0)
         {
             gnc_sx_destroy_temporal_state (tmpState);
             return result;



More information about the gnucash-changes mailing list