Fix Crash with "c:" in deck editor

This commit is contained in:
ZeldaZach 2025-01-31 22:39:04 -05:00
parent 33d8edeb9a
commit 82bc2d154e
No known key found for this signature in database

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");