From cc1e3840011e66dc28025ece05abd492cd55f2ba Mon Sep 17 00:00:00 2001 From: Roy Qu Date: Tue, 4 Jan 2022 17:04:03 +0800 Subject: [PATCH] fix: split command infinite loop --- RedPandaIDE/utils.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/RedPandaIDE/utils.cpp b/RedPandaIDE/utils.cpp index 673ffded..0659d8fe 100644 --- a/RedPandaIDE/utils.cpp +++ b/RedPandaIDE/utils.cpp @@ -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];