source: npl/overig/libical/libical-nth-recur-overflow.diff @ fdfd619

perl-5.22
Last change on this file since fdfd619 was c5c522c, checked in by Edwin Eefting <edwin@datux.nl>, 8 years ago

initial commit, transferred from cleaned syn3 svn tree

  • Property mode set to 100644
File size: 560 bytes
RevLine 
[c5c522c]1--- libical-0.44-pristine/src/libical/icalrecur.c       2014-02-19 16:20:40.000000000 +0100
2+++ libical-0.44/src/libical/icalrecur.c        2014-07-14 20:09:16.000000000 +0200
3@@ -2140,6 +2140,10 @@
4                } else if (pos > 0) {
5                    /* Add the nth instance of the weekday within the month. */
6                    month_day = first_matching_day + (pos - 1) * 7;
7+                   
8+                   /* Track back overflowing days */
9+                   while(month_day > days_in_month)
10+                       month_day -=7;
11 
12                    if (month_day <= days_in_month)
13                        impl->days[days_index++] = (short)(doy_offset + month_day);
Note: See TracBrowser for help on using the repository browser.