mirror of
https://gitlab.com/davical-project/davical.git
synced 2026-05-22 02:04:19 +00:00
When we exceed count we should return null.
This commit is contained in:
parent
a34c522ae5
commit
10242f51ee
@ -144,6 +144,8 @@ BEGIN
|
||||
IF ( count <= past_repeats ) THEN
|
||||
RETURN NULL;
|
||||
END IF;
|
||||
ELSE
|
||||
count := NULL;
|
||||
END IF;
|
||||
|
||||
temp_txt := substring(repeatrule from ''BYSETPOS=([0-9-]+)(;|$)'');
|
||||
@ -217,8 +219,11 @@ BEGIN
|
||||
EXIT WHEN our_answer >= earliest;
|
||||
|
||||
-- Give up if we have exceeded the count
|
||||
EXIT WHEN past_repeats > count;
|
||||
past_repeats := past_repeats + 1;
|
||||
IF ( count IS NOT NULL AND past_repeats > count ) THEN
|
||||
RETURN NULL;
|
||||
ELSE
|
||||
past_repeats := past_repeats + 1;
|
||||
END IF;
|
||||
|
||||
loopcount := loopcount - 1;
|
||||
IF loopcount < 0 THEN
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user