diff options
author | mvglasow <michael -at- vonglasow.com> | 2019-08-10 20:42:56 +0200 |
---|---|---|
committer | mvglasow <michael -at- vonglasow.com> | 2019-08-10 20:42:56 +0200 |
commit | 4a474bc5b15c9447b23e2e2789bb6ffb17fb36fc (patch) | |
tree | 8cb07b62ec7d2abe7a1da77ab8bbcf277bb82267 /navit/traffic.c | |
parent | 03ef7a5d6e4af7b60c6ad16627f3d52d23dc6a25 (diff) | |
download | navit-4a474bc5b15c9447b23e2e2789bb6ffb17fb36fc.tar.gz |
Fix:traffic:Skip trailing empty line when restoring cached items
Signed-off-by: mvglasow <michael -at- vonglasow.com>
Diffstat (limited to 'navit/traffic.c')
-rw-r--r-- | navit/traffic.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/navit/traffic.c b/navit/traffic.c index 09b2170c5..df5ab2898 100644 --- a/navit/traffic.c +++ b/navit/traffic.c @@ -3458,6 +3458,12 @@ static int traffic_message_restore_segments(struct traffic_message * this_, stru g_free(line); line = NULL; } + if (ccnt < 1) { + /* not a complete item, possibly trailing empty line */ + dbg(lvl_debug, "*****checkpoint RESTORE-5, skipping incomplete item (possibly trailing empty line)"); + break; + } + item = tm_add_item(map, type, id_hi, id_lo, flags, attrs, ca, ccnt, |