Fix Crash with "c:" in deck editor (#5537)

This commit is contained in:
Zach H 2025-01-31 23:32:01 -05:00 committed by GitHub
parent b956fd4bac
commit 349c18aa6a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -281,7 +281,7 @@ static void setupParserRules()
for (const auto &i : sv) {
parts += std::any_cast<char>(i);
}
const bool identity = sv.tokens[0][0] != 'i';
const bool identity = sv.tokens[0].empty() || sv.tokens[0][0] != 'i';
if (sv.tokens[1][0] == ':') {
return [=](const CardData &x) {
QString match = identity ? x->getColors() : x->getProperty("coloridentity");