|
|
@@ -128,7 +128,9 @@ func mergeAny(out, in reflect.Value) {
|
|
|
if in.Type().Elem().Kind() == reflect.Uint8 {
|
|
|
// []byte is a scalar bytes field, not a repeated field.
|
|
|
// Make a deep copy.
|
|
|
- out.SetBytes(append([]byte(nil), in.Bytes()...))
|
|
|
+ // Append to []byte{} instead of []byte(nil) so that we never end up
|
|
|
+ // with a nil result.
|
|
|
+ out.SetBytes(append([]byte{}, in.Bytes()...))
|
|
|
return
|
|
|
}
|
|
|
n := in.Len()
|