Workaround for GCC12 bug illustrated by https://godbolt.org/z/Pe5aE59xG

Fixes #4108

PiperOrigin-RevId: 499556061
Change-Id: I1cb1564f9b77e1825fddc9236965f4a3b661d96a
This commit is contained in:
Derek Mauro 2023-01-04 12:49:23 -08:00 committed by Copybara-Service
parent 3a99ab6d83
commit 0296d7d370

View File

@ -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);