Fix priority parsing in iCal imports

Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
This commit is contained in:
dott authored and Lukas Fleischer committed 2018-11-24 00:26:09 +01:00
1 parent e3ca60eefe
commit 3f267d0473
4 files changed
+4 -4

No files matched your search

+1 -1
View File
@@ -1087,7 +1087,7 @@ ical_read_todo(FILE * fdi, FILE * log, unsigned *notodos, unsigned *noskipped,
}
if (starts_with_ci(buf, "PRIORITY:")) {
sscanf(buf, "%d", &vtodo.priority);
sscanf(buf, "PRIORITY:%d\n", &vtodo.priority);
if (vtodo.priority < 0 || vtodo.priority > 9) {
ical_log(log, ICAL_VTODO, ITEMLINE,
_("item priority is invalid "