r15610 - gnucash/trunk/src/gnome-utils - Fix compilation; breakage when going outside of FreqSpec's capabilities.

Josh Sled jsled at cvs.gnucash.org
Sun Feb 18 17:54:11 EST 2007


Author: jsled
Date: 2007-02-18 17:54:11 -0500 (Sun, 18 Feb 2007)
New Revision: 15610
Trac: http://svn.gnucash.org/trac/changeset/15610

Modified:
   gnucash/trunk/src/gnome-utils/gnc-frequency.c
Log:
Fix compilation; breakage when going outside of FreqSpec's capabilities.


Modified: gnucash/trunk/src/gnome-utils/gnc-frequency.c
===================================================================
--- gnucash/trunk/src/gnome-utils/gnc-frequency.c	2007-02-18 21:59:14 UTC (rev 15609)
+++ gnucash/trunk/src/gnome-utils/gnc-frequency.c	2007-02-18 22:54:11 UTC (rev 15610)
@@ -261,6 +261,7 @@
          * don't change any other settings.  */
         if (NULL == fs) return;
 
+        uift = xaccFreqSpecGetUIType(fs);
         switch ( uift ) 
         {
         case UIFREQ_NONE:
@@ -605,7 +606,7 @@
                 if (day > 30)
                 {
                     g_critical("freq spec doesn't support last-day-of-month");
-                    break;
+                    day = 30;
                 }
                 tmpFS = xaccFreqSpecMalloc(gnc_get_current_book ());
                 g_date_to_struct_tm( &gd, &stm);
@@ -624,7 +625,7 @@
                 if (day > 30)
                 {
                     g_critical("freq spec doesn't support last-day-of-month");
-                    break;
+                    day = 30;
                 }
                 tmpFS = xaccFreqSpecMalloc(gnc_get_current_book ());
                 start_tt = gnc_date_edit_get_date( gf->startDate );
@@ -652,6 +653,7 @@
                 if (day > 30)
                 {
                     g_critical("freq spec doesn't support last-day-of-month");
+                    day = 30;
                 }
                 g_date_set_time_t(&gd, time(NULL));
                 g_date_set_month(&gd, 1);



More information about the gnucash-changes mailing list