From fd01a9fb7535dcf4025a379c24edabe4c35e6e71 Mon Sep 17 00:00:00 2001 From: Jonas Karlsson Date: Thu, 22 Apr 2021 14:47:10 +0200 Subject: Fix infinite loop in qmake option parsing If calling 'qmake -qtconf file' an infinite loop occurs. Bug introduced in 661b586a69740bd9a1791622f8b238d290ebe00d Change-Id: I3ccc067570308227b605d700b41b299800aa872a Reviewed-by: Alexandru Croitor (cherry picked from commit 6b1a7341fed4b9456ea6bfa2de7412d45ef56c65) Reviewed-by: Qt Cherry-pick Bot --- qmake/option.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'qmake') diff --git a/qmake/option.cpp b/qmake/option.cpp index 0d5746bb09..88b018eb97 100644 --- a/qmake/option.cpp +++ b/qmake/option.cpp @@ -421,10 +421,11 @@ Option::init(int argc, char **argv) } else if (opt == "-makefile") { Option::qmake_mode = Option::QMAKE_GENERATE_MAKEFILE; } else if (opt == "-qtconf") { - // Move the argument following "-qtconf " in front and check again. - if (args.length() >= 3) + if (args.length() >= 3) { + // Move the argument following "-qtconf " in front and check again. args.prepend(args.takeAt(2)); - continue; + continue; + } } else { break; } -- cgit v1.2.3