ruby-protobuf / protobuf

A pure ruby implementation of Google's Protocol Buffers
https://github.com/ruby-protobuf
MIT License
462 stars 101 forks source link

Non-packed fields are encoded as packed #420

Open podruh opened 3 years ago

podruh commented 3 years ago

We have found that fields marked as non-packed are still being encoded as packed. I have dug around and found the issue in lib/protobuf/field/base_field.rb:58 which contains line @packed = @repeated && options.key?(:packed)

This line should also check the value in options[:packed].

This also relates to #414

Gem version: v3.10.3