fix: split command infinite loop

This commit is contained in:
Roy Qu 2022-01-04 17:04:03 +08:00
parent bb6a4ed9c8
commit cc1e384001
1 changed files with 6 additions and 6 deletions

View File

@ -1030,23 +1030,23 @@ QStringList splitProcessCommand(const QString &cmd)
case SplitProcessCommandQuoteType::Double:
quoteType = SplitProcessCommandQuoteType::None;
break;
case SplitProcessCommandQuoteType::Single:
break;
default:
current+=cmd[i];
}
current+=cmd[i];
i++;
break;
case '\'':
switch(quoteType) {
case SplitProcessCommandQuoteType::None:
quoteType = SplitProcessCommandQuoteType::Single;
break;
case SplitProcessCommandQuoteType::Double:
break;
case SplitProcessCommandQuoteType::Single:
quoteType = SplitProcessCommandQuoteType::None;
break;
default:
current+=cmd[i];
}
current+=cmd[i];
i++;
break;
case '\\':
current += cmd[i];