From c41a49b0b5b6f2b7c742cefe3b39916472cd6e7d Mon Sep 17 00:00:00 2001 From: Damon Chaplin Date: Tue, 10 Jul 2001 02:45:51 +0000 Subject: forgot to compile before committing. Idiot. 2001-07-09 Damon Chaplin * src/libical/icaltime.c (icaltime_adjust): forgot to compile before committing. Idiot. svn path=/trunk/; revision=10945 --- libical/src/libical/icaltime.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'libical/src') diff --git a/libical/src/libical/icaltime.c b/libical/src/libical/icaltime.c index e3229c6925..6c720b7941 100644 --- a/libical/src/libical/icaltime.c +++ b/libical/src/libical/icaltime.c @@ -587,7 +587,7 @@ icaltime_adjust (struct icaltimetype *tt, int seconds) { int second, minute, hour, day; - int minutes_overflow, hours_overflow, days_overflow; + int minutes_overflow, hours_overflow, days_overflow, years_overflow; int days_in_month; /* Add on the seconds. */ @@ -621,12 +621,12 @@ icaltime_adjust (struct icaltimetype *tt, need to know what month it is to get the number of days in it. Note that months are 1 to 12, so we have to be a bit careful. */ if (tt->month >= 13) { - years_overflow = (month - 1) / 12; + years_overflow = (tt->month - 1) / 12; tt->year += years_overflow; tt->month -= years_overflow * 12; } else if (tt->month <= 0) { /* 0 to -11 is -1 year out, -12 to -23 is -2 years. */ - years_overflow = (month / 12) - 1; + years_overflow = (tt->month / 12) - 1; tt->year += years_overflow; tt->month -= years_overflow * 12; } -- cgit