diff options
author | Derek Mauro <dmauro@google.com> | 2023-01-04 20:49:23 (GMT) |
---|---|---|
committer | Copybara-Service <copybara-worker@google.com> | 2023-01-04 20:50:14 (GMT) |
commit | 0296d7d37007ec54441cb9f8cd001da6ac58eea8 (patch) | |
tree | 73b8ae9aa3c6d8f5c7763a78a6bb4c4fde5634f9 /googletest | |
parent | 3a99ab6d8326c845af0672a0cd64dd05ad7734fe (diff) | |
download | googletest-0296d7d37007ec54441cb9f8cd001da6ac58eea8.zip googletest-0296d7d37007ec54441cb9f8cd001da6ac58eea8.tar.gz googletest-0296d7d37007ec54441cb9f8cd001da6ac58eea8.tar.bz2 |
Workaround for GCC12 bug illustrated by https://godbolt.org/z/Pe5aE59xG
Fixes #4108
PiperOrigin-RevId: 499556061
Change-Id: I1cb1564f9b77e1825fddc9236965f4a3b661d96a
Diffstat (limited to 'googletest')
-rw-r--r-- | googletest/src/gtest.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/googletest/src/gtest.cc b/googletest/src/gtest.cc index 0803cf3..08eaefb 100644 --- a/googletest/src/gtest.cc +++ b/googletest/src/gtest.cc @@ -4888,7 +4888,8 @@ std::string StreamingListener::UrlEncode(const char* str) { case '=': case '&': case '\n': - result.append("%" + String::FormatByte(static_cast<unsigned char>(ch))); + result.push_back('%'); + result.append(String::FormatByte(static_cast<unsigned char>(ch))); break; default: result.push_back(ch); |