From 7d8e773a22fd9978beb86cc2654cdb9fcca39e1f Mon Sep 17 00:00:00 2001 From: RickyRister Date: Mon, 24 Feb 2025 21:23:23 -0800 Subject: [PATCH] Fix segfault when oracle reads card without "num" field --- oracle/src/oracleimporter.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/oracle/src/oracleimporter.cpp b/oracle/src/oracleimporter.cpp index 45cd389b5..07aad804d 100644 --- a/oracle/src/oracleimporter.cpp +++ b/oracle/src/oracleimporter.cpp @@ -289,7 +289,7 @@ int OracleImporter::importCardsFromSet(const CardSetPtr ¤tSet, const QList QString numComponent; const QString numProperty = setInfo.getProperty("num"); - const QChar lastChar = numProperty.at(numProperty.size() - 1); + const QChar lastChar = numProperty.isEmpty() ? QChar() : numProperty.back(); // Un-Sets do some wonky stuff. Split up these cards as individual entries. if (setsWithCardsWithSameNameButDifferentText.contains(currentSet->getShortName()) &&