Fix segfault when oracle reads card without "num" field (#5654)

This commit is contained in:
RickyRister 2025-02-25 15:29:43 -08:00 committed by GitHub
parent 57e37e8f4d
commit 49932ee6f8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -289,7 +289,7 @@ int OracleImporter::importCardsFromSet(const CardSetPtr &currentSet, 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()) &&