From 38b83acae057bcf310ebe920ab8661e97bf2b019 Mon Sep 17 00:00:00 2001 From: Daenyth Date: Sat, 21 Jun 2014 12:42:46 -0400 Subject: [PATCH] Fix #105 - remove emdash from card type when getting main type --- cockatrice/src/carddatabase.cpp | 2 ++ cockatrice/src/main.cpp | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/cockatrice/src/carddatabase.cpp b/cockatrice/src/carddatabase.cpp index 2045f95e2..3b8d9e955 100644 --- a/cockatrice/src/carddatabase.cpp +++ b/cockatrice/src/carddatabase.cpp @@ -295,6 +295,8 @@ QString CardInfo::getMainCardType() const int pos; if ((pos = result.indexOf('-')) != -1) result.remove(pos, result.length()); + if ((pos = result.indexOf("—")) != -1) + result.remove(pos, result.length()); if ((pos = result.indexOf("//")) != -1) result.remove(pos, result.length()); result = result.simplified(); diff --git a/cockatrice/src/main.cpp b/cockatrice/src/main.cpp index ef57655a0..692f8652f 100644 --- a/cockatrice/src/main.cpp +++ b/cockatrice/src/main.cpp @@ -116,9 +116,9 @@ int main(int argc, char *argv[]) qtTranslator = new QTranslator; translator = new QTranslator; installNewTranslator(); - + qsrand(QDateTime::currentDateTime().toTime_t()); - + bool startMainProgram = true; const QString dataDir = QDesktopServices::storageLocation(QDesktopServices::DataLocation); if (!db->getLoadSuccess())