Fix priority parsing in iCal imports

Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
This commit is contained in:
dott 2018-11-14 06:07:59 +01:00 committed by Lukas Fleischer
parent e3ca60eefe
commit 3f267d0473
4 changed files with 4 additions and 4 deletions

View File

@ -1087,7 +1087,7 @@ ical_read_todo(FILE * fdi, FILE * log, unsigned *notodos, unsigned *noskipped,
} }
if (starts_with_ci(buf, "PRIORITY:")) { 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) { if (vtodo.priority < 0 || vtodo.priority > 9) {
ical_log(log, ICAL_VTODO, ITEMLINE, ical_log(log, ICAL_VTODO, ITEMLINE,
_("item priority is invalid " _("item priority is invalid "

View File

@ -21,7 +21,7 @@ Import process report: 0017 lines read
- ..:.. -> 09:18 - ..:.. -> 09:18
Calibrator's Calibrator's
to do: to do:
0. Nary parabled Louvre's fleetest mered 1. Nary parabled Louvre's fleetest mered
EOD EOD
else else
./run-test "$0" ./run-test "$0"

View File

@ -21,7 +21,7 @@ Import process report: 0017 lines read
- ..:.. -> 09:18 - ..:.. -> 09:18
Calibrator's Calibrator's
to do: to do:
0. Nary parabled Louvre's fleetest mered 1. Nary parabled Louvre's fleetest mered
EOD EOD
else else
./run-test "$0" ./run-test "$0"

View File

@ -21,7 +21,7 @@ Import process report: 0017 lines read
- ..:.. -> 09:18 - ..:.. -> 09:18
Calibrator's Calibrator's
to do: to do:
0. Nary parabled Louvre's fleetest mered 1. Nary parabled Louvre's fleetest mered
EOD EOD
else else
./run-test "$0" ./run-test "$0"