Unverified Commit d052a055 authored by Jan Tattermusch's avatar Jan Tattermusch Committed by GitHub

Merge pull request #6828 from ObsidianMinor/csharp/get-string-overload

Use 3 parameter Encoding.GetString for default string values
parents 4668a332 e119a432
......@@ -308,7 +308,7 @@ std::string FieldGeneratorBase::GetStringDefaultValueInternal(const FieldDescrip
else
return "global::System.Text.Encoding.UTF8.GetString(global::System."
"Convert.FromBase64String(\"" +
StringToBase64(descriptor->default_value_string()) + "\"))";
StringToBase64(descriptor->default_value_string()) + "\"), 0, " + StrCat(descriptor->default_value_string().length()) + ")";
}
std::string FieldGeneratorBase::GetBytesDefaultValueInternal(const FieldDescriptor* descriptor) {
......
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