mirror of
https://gitlab.kitware.com/cmake/cmake.git
synced 2026-09-25 04:09:36 +03: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