summaryrefslogtreecommitdiffstats
path: root/Source/cmFileCommand.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2017-01-16 15:37:42 (GMT)
committerBrad King <brad.king@kitware.com>2017-01-16 15:47:32 (GMT)
commit2bba0bfc2c113a1ec94802ecfb8a836a385f919b (patch)
tree46ff211bbbc0920565d7f752927a849c42585b1d /Source/cmFileCommand.cxx
parent85a8939e2fc7eb2715a9264fd40c009c3a98cb8b (diff)
downloadCMake-2bba0bfc2c113a1ec94802ecfb8a836a385f919b.zip
CMake-2bba0bfc2c113a1ec94802ecfb8a836a385f919b.tar.gz
CMake-2bba0bfc2c113a1ec94802ecfb8a836a385f919b.tar.bz2
file: Fix crash on GLOB with no expressions after LIST_DIRECTORIES
Since commit v3.3.0-rc1~318^2~1 (file: Teach GLOB to list directories optionally, 2015-03-17) using `LIST_DIRECTORIES` followed by no expression causes a crash. Fix the logic to avoid the crash. Fixes: #16565
Diffstat (limited to 'Source/cmFileCommand.cxx')
-rw-r--r--Source/cmFileCommand.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/cmFileCommand.cxx b/Source/cmFileCommand.cxx
index d10c886..91cecb3 100644
--- a/Source/cmFileCommand.cxx
+++ b/Source/cmFileCommand.cxx
@@ -788,7 +788,7 @@ bool cmFileCommand::HandleGlobCommand(std::vector<std::string> const& args,
this->SetError("LIST_DIRECTORIES missing bool value.");
return false;
}
- ++i;
+ continue;
}
if (recurse && (*i == "FOLLOW_SYMLINKS")) {