kidok / protobuf

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

Double encoded as length-delimited wire-type #633

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Using 
https://github.com/rethinkdb/rethinkdb/blob/next/src/rdb_protocol/ql2.proto
2. Using a Datum with r_num=1.0
3. Serializing to binary for network transport

What is the expected output?
somewhere in the binary data:
0x19 and 8 bytes for the double r_num

What do you see instead?
0x1A and 8 bytes, typically the first one being 0x00 throwing off readers that 
depend on the 3-bit wire-type-indicator.

See also

https://github.com/rethinkdb/rethinkdb/issues/2286

Original issue reported on code.google.com by stijnsan...@gmail.com on 22 Apr 2014 at 1:04