Commit ef4d5d0f authored by Alexander Lohnau's avatar Alexander Lohnau 💬
Browse files

calculatorrunner: Fix mixed hex+decimal calculations

BUG: 431362
FIXED-IN: 5.21.1
parent 1a6848cf
......@@ -231,7 +231,7 @@ void CalculatorRunner::match(Plasma::RunnerContext &context)
bool toHex = cmd.startsWith(QLatin1String("hex="));
bool startsWithEquals = !toHex && cmd[0] == QLatin1Char('=');
const static QRegularExpression hexRegex(QStringLiteral("^=?0x.+"), QRegularExpression::CaseInsensitiveOption);
const static QRegularExpression hexRegex(QStringLiteral("0x[0-9a-f]+"), QRegularExpression::CaseInsensitiveOption);
const bool parseHex = cmd.contains(hexRegex);
if (!parseHex) {
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment