wiln / protoc-gen-as3

Automatically exported from code.google.com/p/protoc-gen-as3
BSD 2-Clause "Simplified" License
0 stars 0 forks source link

Failed on skipping fields(v0.8.9) #35

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
We have faced with the problem of extending server side api.
We added optional field at the end of the message:
optional uint64 creation_date = 11;

Flash client fails with next error(java and c clients work correctly):
Exception fault: Error: Invalid wire type: 3
 at com.netease.protobuf::ReadUtils$/skip()[.../ReadUtils.as:32]

bytes for this fields look like - 58a080a3eb8227
58 - field descriptor
a080a3eb8227 - data

According to code of ReadUtils:
case WireType.VARINT:
   while (input.readUnsignedByte() > 0x80) {}

but we have second byte = 80 so the parsing is stopped
and next bytes are not read correctly

Original issue reported on code.google.com by adeyneka on 14 Aug 2012 at 12:12

GoogleCodeExporter commented 9 years ago
Oh, it's a horrible bug.

Original comment by pop.atry@gmail.com on 15 Aug 2012 at 6:42

GoogleCodeExporter commented 9 years ago
Fixed in default branch.

Original comment by pop.atry@gmail.com on 15 Aug 2012 at 6:46