[Evolution-hackers] Bugfix for "e-calendar-item.c".



Hi!

I'm using the "e-calendar-item" and "e-calendar" libraries from
Evolution in our own project called Fisterra (http://www.fisterra.org).
I've found a small bug in the "e_calendar_item_normalize_date" function
from "e-calendar-item.c". In our program, we move forward and backward
in 12 months steps and I've noticed that, moving backward -12 months and
being January the month, the normalize function decrements the year in
-2 instead of -1. This is the patch:

@@ -2499,7 +2501,7 @@
                *year += *month / 12;
                *month = *month % 12;
        } else {
-               *year += *month / 12 - 1;
+               *year += (*month + 1) / 12 - 1;
                *month = *month % 12;
                if (*month != 0)
                        *month += 12;


I've wroten to the authors noted in the files but I've received a
"unknown user" message for each one, so that's what I'm writing in this
list.

Regards.
-- 
Andrés Gómez García
Ingeniero en Informática
Telf:  +34 981 91 39 91
Fax:   +34 981 91 39 49
mailto:agomez igalia com
IGALIA, S.L. http://www.igalia.com




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]