aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordott <dott@bob>2018-11-14 06:07:59 +0100
committerLukas Fleischer <lfleischer@calcurse.org>2018-11-24 00:26:09 +0100
commit3f267d0473b1e34c858edac334e17bf48c0c407d (patch)
tree08e4b58bf7d7a15c25ceeab38afada5587b876eb
parente3ca60eefe08b253ff436fe16d85b4317c7a2523 (diff)
downloadcalcurse-3f267d0473b1e34c858edac334e17bf48c0c407d.tar.gz
calcurse-3f267d0473b1e34c858edac334e17bf48c0c407d.zip
Fix priority parsing in iCal imports
Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
-rw-r--r--src/ical.c2
-rwxr-xr-xtest/ical-001.sh2
-rwxr-xr-xtest/ical-004.sh2
-rwxr-xr-xtest/ical-008.sh2
4 files changed, 4 insertions, 4 deletions
diff --git a/src/ical.c b/src/ical.c
index 95fef51..b5c915a 100644
--- a/src/ical.c
+++ b/src/ical.c
@@ -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 "
diff --git a/test/ical-001.sh b/test/ical-001.sh
index f0e49ff..ff5b9ce 100755
--- a/test/ical-001.sh
+++ b/test/ical-001.sh
@@ -21,7 +21,7 @@ Import process report: 0017 lines read
- ..:.. -> 09:18
Calibrator's
to do:
-0. Nary parabled Louvre's fleetest mered
+1. Nary parabled Louvre's fleetest mered
EOD
else
./run-test "$0"
diff --git a/test/ical-004.sh b/test/ical-004.sh
index 877a917..1819791 100755
--- a/test/ical-004.sh
+++ b/test/ical-004.sh
@@ -21,7 +21,7 @@ Import process report: 0017 lines read
- ..:.. -> 09:18
Calibrator's
to do:
-0. Nary parabled Louvre's fleetest mered
+1. Nary parabled Louvre's fleetest mered
EOD
else
./run-test "$0"
diff --git a/test/ical-008.sh b/test/ical-008.sh
index ff45cad..bc59e56 100755
--- a/test/ical-008.sh
+++ b/test/ical-008.sh
@@ -21,7 +21,7 @@ Import process report: 0017 lines read
- ..:.. -> 09:18
Calibrator's
to do:
-0. Nary parabled Louvre's fleetest mered
+1. Nary parabled Louvre's fleetest mered
EOD
else
./run-test "$0"