mirror of
https://github.com/Kitware/CMake.git
synced 2026-02-11 01:29:36 -06:00
Source: fix possible undefined behavior
This commit is contained in:
@@ -798,7 +798,9 @@ static std::string joinCommandLine(std::vector<std::string> const& args)
|
||||
}
|
||||
|
||||
// drop trailing whitespace
|
||||
ret.erase(ret.size() - 1);
|
||||
if (!ret.empty()) {
|
||||
ret.pop_back();
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user