From eeb303a5c128871304d5655264352652905412f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luis=20=C3=81ngel=20San=20Mart=C3=ADn?= Date: Sun, 28 Apr 2019 09:30:15 +0200 Subject: [PATCH] Avoid parsing non supported dates from comic vine --- YACReaderLibrary/comic_vine/comic_vine_dialog.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/YACReaderLibrary/comic_vine/comic_vine_dialog.cpp b/YACReaderLibrary/comic_vine/comic_vine_dialog.cpp index 2ba8763a..4d29921a 100644 --- a/YACReaderLibrary/comic_vine/comic_vine_dialog.cpp +++ b/YACReaderLibrary/comic_vine/comic_vine_dialog.cpp @@ -562,8 +562,11 @@ ComicDB ComicVineDialog::parseComicInfo(ComicDB & comic, const QString & json, i QString date = result.property("cover_date").toString(); QStringList tempList = date.split("-"); - std::reverse(tempList.begin(),tempList.end()); - comic.info.date = tempList.join("/"); + + if (tempList.length() == 3) { + std::reverse(tempList.begin(),tempList.end()); + comic.info.date = tempList.join("/"); + } } if (!result.property("description").isNull()) {