diff options
author | vng <viktor.govako@gmail.com> | 2012-12-17 21:04:20 +0400 |
---|---|---|
committer | Alex Zolotarev <alex@maps.me> | 2015-09-23 01:48:02 +0300 |
commit | a4a7b15b6c64d112c2c8568145b18b9fe4461986 (patch) | |
tree | bccd9329659b80aa78f5a84e8075f042314a6263 /map/bookmark.cpp | |
parent | 362a283c933a30ceb86ce090759d499bd9afebcc (diff) |
Fix bug with bookmarks loading.
Diffstat (limited to 'map/bookmark.cpp')
-rw-r--r-- | map/bookmark.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/map/bookmark.cpp b/map/bookmark.cpp index e64f552fc4..8761f7d69d 100644 --- a/map/bookmark.cpp +++ b/map/bookmark.cpp @@ -231,7 +231,7 @@ namespace bookmark_impl else if (currTag == "description") m_description = value; } - else if (count > 3 && m_tags[2] == "Placemark") + else if (count > 3 && m_tags[count-3] == "Placemark") { if (prevTag == "Point") { @@ -265,7 +265,8 @@ void BookmarkCategory::LoadFromKML(ReaderPtr<Reader> const & reader) { ReaderSource<ReaderPtr<Reader> > src(reader); bookmark_impl::KMLParser parser(*this); - ParseXML(src, parser, true); + if (!ParseXML(src, parser, true)) + LOG(LERROR, ("XML read error. Probably, incorrect file encoding.")); } BookmarkCategory * BookmarkCategory::CreateFromKMLFile(string const & file) |