Status: WorkingAsIntended
        Owner: jas...@google.com

Comment #1 on issue 285 by jas...@google.com: Generated C++ operator= to CopyFrom() to MergeFrom() mishandles bytes fields as strings

Are you sure that when you execute step 2, the field actually gets that string value assigned? Note that the setter accepts a const char*, so if your code does:
You end up setting the source to a zero-length string. You would instead need to do:

string value("\0\0\0\0abc", 7);

When I set the field this way, the full field was properly copied. For MergeFrom, the code generator emits:
Looking through the revision history it does not appear to have ever used c_str()

You received this message because you are subscribed to the Google Groups "Protocol 
Buffers" group.
To post to this group, send email to protobuf@googlegroups.com.
To unsubscribe from this group, send email to 
For more options, visit this group at 

Reply via email to