Skip to content

Commit

Permalink
Fix fix fix
Browse files Browse the repository at this point in the history
  • Loading branch information
peterix committed May 17, 2023
1 parent 8a82ec5 commit baa0fd8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions launcher/minecraft/MinecraftInstance.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,7 @@ QProcessEnvironment MinecraftInstance::createEnvironment()
static QString replaceTokensIn(QString text, QMap<QString, QString> with)
{
QString result;
QRegularExpression token_regexp("\\$\\{(.+?)\\}");
QRegularExpression token_regexp("\\$\\{([^}]+)\\}");
int tail = 0;
int head = 0;
while (true) {
Expand All @@ -407,7 +407,7 @@ static QString replaceTokensIn(QString text, QMap<QString, QString> with)
}
head = match.capturedStart();
result.append(text.mid(tail, head - tail));
auto key = match.captured();
auto key = match.captured(1);
auto iter = with.find(key);
if (iter != with.end())
{
Expand Down

0 comments on commit baa0fd8

Please sign in to comment.