Unverified Commit 6c3c7f6d authored by Jisi Liu's avatar Jisi Liu Committed by GitHub

Merge pull request #4076 from pherl/stringback

Fix string::back() usage in googletest.cc
parents eff55ece 19d0e993
...@@ -132,7 +132,7 @@ string GetTemporaryDirectoryName() { ...@@ -132,7 +132,7 @@ string GetTemporaryDirectoryName() {
// with "\\?\") but these will be degenerate in the sense that you cannot // with "\\?\") but these will be degenerate in the sense that you cannot
// chdir into such directories (or navigate into them with Windows Explorer) // chdir into such directories (or navigate into them with Windows Explorer)
// nor can you open such files with some programs (e.g. Notepad). // nor can you open such files with some programs (e.g. Notepad).
if (result.back() == '.') { if (result[result.size() - 1] == '.') {
result[result.size() - 1] = '_'; result[result.size() - 1] = '_';
} }
// On Win32, tmpnam() returns a file prefixed with '\', but which is supposed // On Win32, tmpnam() returns a file prefixed with '\', but which is supposed
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment