alexeyxo / protobuf-swift

Google ProtocolBuffers for Apple Swift
http://protobuf.io/#swift
Apache License 2.0
938 stars 138 forks source link

Message Repeated enum mergFromData Error #166

Closed 13812453806 closed 8 years ago

13812453806 commented 8 years ago

Version of protoc (protoc --version)

3.0

Version of ProtocolBuffers.framework

2.4.3

.proto file to reproduce

message IToken { enum ITokenType { ATT_NO_USE = 0; ATT_ONCE = 1; ATT_ONCE_IP = 2; ATT_TIME = 3; ATT_FOREVER = 4; } repeated ITokenType itt= 4; }

Description

this proto build to swift can not mergFromData from base64

alexeyxo commented 8 years ago

Please, add more description and example about the problem.

alexeyxo commented 8 years ago

this method works only with binary pb data format without encode.

13812453806 commented 8 years ago

Repeated enum encode to base64 string, then decode from this base64 String will crash