From b017c9f12758ea169aa6009a4146e1562946e3a0 Mon Sep 17 00:00:00 2001 From: Ben Boeckel Date: Tue, 16 May 2023 12:14:58 -0400 Subject: cmGlobalGenerator: fix off-by-one for `&&` command joining Only add `&&` if there is another command after the current one. --- Source/cmGlobalGenerator.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx index 769a7db..874c98d 100644 --- a/Source/cmGlobalGenerator.cxx +++ b/Source/cmGlobalGenerator.cxx @@ -2181,7 +2181,7 @@ int cmGlobalGenerator::Build( command != makeCommand.end() && retVal == 0; ++command) { makeCommandStr = command->Printable(); outputMakeCommandStr = command->QuotedPrintable(); - if (command != makeCommand.end()) { + if ((command + 1) != makeCommand.end()) { makeCommandStr += " && "; outputMakeCommandStr += " && "; } -- cgit v0.12