summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalGenerator.cxx
diff options
context:
space:
mode:
authorBen Boeckel <ben.boeckel@kitware.com>2023-05-16 16:14:58 (GMT)
committerBen Boeckel <ben.boeckel@kitware.com>2023-05-16 16:48:20 (GMT)
commitb017c9f12758ea169aa6009a4146e1562946e3a0 (patch)
treee4b867a36deedb720b99b717153a4ffc484d6ced /Source/cmGlobalGenerator.cxx
parentc715fd8d767d44381a682ec7e85bd53f727fbd2b (diff)
downloadCMake-b017c9f12758ea169aa6009a4146e1562946e3a0.zip
CMake-b017c9f12758ea169aa6009a4146e1562946e3a0.tar.gz
CMake-b017c9f12758ea169aa6009a4146e1562946e3a0.tar.bz2
cmGlobalGenerator: fix off-by-one for `&&` command joining
Only add `&&` if there is another command after the current one.
Diffstat (limited to 'Source/cmGlobalGenerator.cxx')
-rw-r--r--Source/cmGlobalGenerator.cxx2
1 files changed, 1 insertions, 1 deletions
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 += " && ";
}