mirror of
https://salsa.debian.org/dskoll/remind.git
synced 2026-04-18 07:18:47 +02:00
Parse untriggered reminder lines to catch expression-pasting errors.
This commit is contained in:
12
src/dorem.c
12
src/dorem.c
@@ -168,6 +168,7 @@ int DoRem(ParsePtr p)
|
||||
FreeTrig(&trig);
|
||||
return OK;
|
||||
}
|
||||
|
||||
/* Queue the reminder, if necessary */
|
||||
if (jul == JulianToday &&
|
||||
!(!IgnoreOnce &&
|
||||
@@ -180,15 +181,24 @@ int DoRem(ParsePtr p)
|
||||
return OK;
|
||||
}
|
||||
|
||||
r = OK;
|
||||
if (ShouldTriggerReminder(&trig, &tim, jul, &err)) {
|
||||
if ( (r=TriggerReminder(p, &trig, &tim, jul)) ) {
|
||||
FreeTrig(&trig);
|
||||
return r;
|
||||
}
|
||||
} else {
|
||||
/* Parse the rest of the line to catch any potential
|
||||
expression-pasting errors */
|
||||
while (ParseChar(p, &r, 0)) {
|
||||
if (r != 0) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
FreeTrig(&trig);
|
||||
return OK;
|
||||
return r;
|
||||
}
|
||||
|
||||
/***************************************************************/
|
||||
|
||||
Reference in New Issue
Block a user