Fix catastrophic regex mistake

Signed-off-by: TheKodeToad <TheKodeToad@proton.me>
This commit is contained in:
TheKodeToad 2025-04-19 00:12:38 +01:00 committed by GitHub
parent 3df98dd5e7
commit 92ba13cfdb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1011,7 +1011,7 @@ MessageLevel::Enum MinecraftInstance::guessLevel(const QString& line, MessageLev
// NOTE: this diverges from the real regexp. no unicode, the first section is + instead of *
static const QRegularExpression JAVA_EXCEPTION(
R"(Exception in thread|...\d more$|(\s+at |Caused by: )([a-zA-Z_$][a-zA-Z\d_$]*\.)+[a-zA-Z_$][a-zA-Z\d_$]*)|([a-zA-Z_$][a-zA-Z\d_$]*\.)+[a-zA-Z_$][a-zA-Z\d_$]*(Exception|Error|Throwable)");
R"((Exception in thread|...\d more$|(\s+at |Caused by: )([a-zA-Z_$][a-zA-Z\d_$]*\.)+[a-zA-Z_$][a-zA-Z\d_$]*)|([a-zA-Z_$][a-zA-Z\d_$]*\.)+[a-zA-Z_$][a-zA-Z\d_$]*(Exception|Error|Throwable))");
if (line.contains(JAVA_EXCEPTION))
return MessageLevel::Error;