adwinsky / goprotobuf

Automatically exported from code.google.com/p/goprotobuf
Other
0 stars 0 forks source link

Don't concatenate when merging optional bytes #51

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Create a proto that contains optional bytes
  x := Message{ m: []byte("a") }
  y := Message{ m: []byte("b") }
2. merge them and see the value
  proto.Merge(x, y)
  fmt.Println(string(x.m))

What is the expected output? What do you see instead?
  "b" is expected. However, we got "ab".

What version of the product are you using? On what operating system?

Please provide any additional information below.

Original issue reported on code.google.com by shin...@google.com on 23 Apr 2014 at 7:54

GoogleCodeExporter commented 9 years ago
I tried to write a patch.
https://codereview.appspot.com/90260044/

Original comment by shin...@google.com on 23 Apr 2014 at 7:54

GoogleCodeExporter commented 9 years ago

Original comment by dsymo...@golang.org on 23 Apr 2014 at 1:46

GoogleCodeExporter commented 9 years ago

Original comment by dsymo...@golang.org on 23 Apr 2014 at 3:24

GoogleCodeExporter commented 9 years ago
This issue was closed by revision 556b9de4249f.

Original comment by dsymo...@golang.org on 26 Apr 2014 at 4:28