Hello,
I use the following prototype :
message Find {
required uint64 tag = 1;
required Common.Hash peerID = 2;
required string pattern = 3;
}
Now:
Protos::Core::Find findProto;
findProto.set_tag(9999);
(findProto.tag() == 9999) is true.
findProto.DebugString() return
tag: 9999
peerID {
hash: "323655354"
}
pattern: "coucou"
)
Great isn't it ?
But now, if I serialize and unserialize the prototype
std::string output;
findProto.SerializeToString(&output);
Protos::Core::Find findMessage;
findMessage.ParseFromString(output);
What do I get ?
tag: 30064781071
peerID {
hash: "323655354"
}
pattern: "coucou"
)
Why my tag changed oO ? It's not a random value, and it's works for
small numbers.
I tried to change the type of tag to uint32, int32, etc. always the
same problem.
Thanks for your help,
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Protocol Buffers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/protobuf?hl=en
-~----------~----~----~----~------~----~------~--~---