char mess[MAX_MESSLEN] ; . //Load some properties for the group com call . . bplMessage.SerializeToArray(mess,bplMessage.ByteSize());
//what I am using to detect trailing bytes for(int i =0; i< bplMessage.ByteSize();i++) { std::cout << (int) mess[i] << std::endl; } On Dec 17, 8:32 am, Kenton Varda <ken...@google.com> wrote: > Hi Ryan, > What does your code look like that calls SerializeToArray()? It should be > something like: > > int size = message.ByteSize(); > char* array = new char[size]; > message.SerializeToArray(array, size); > > On Tue, Dec 16, 2008 at 8:13 PM, Ryan <ryanroll...@gmail.com> wrote: > > > I have been working with a Group Communication System and Protocol > > Buffers. > > > I have an issue where the C++ SerializeToArray call on one of my > > messages is occasionally appending Bytes {1,0,0,0,0,0,0,0,0} to the > > end of the returned character array? > > > Any ideas on what might be causing this? I can Marshall/Unmarshall > > fine using the java api but the C++ call above has the odd quirk > > mentioned. > > > The Java parsingFrom fails on the C++ generated messages that have the > > above bytes appended. > > > Any suggestions much appreciated. --~--~---------~--~----~------------~-------~--~----~ 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 protobuf+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/protobuf?hl=en -~----------~----~----~----~------~----~------~--~---