Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: handling of map entries with omitted key or value #1348

Merged
merged 2 commits into from
Jul 10, 2020

Commits on Feb 4, 2020

  1. Fix handling of map entries with omitted key or value

    According to [1], map encoding must be compatible with a repeated message
    using indices 1 and 2 for key and value. In particular this implies that
    both key and value may be omitted when they are equal to the default
    value - which some protobuf implementations like protobuf-c actually do.
    
    The comments in the added testcase are based on the output of
    protobuf-inspector [2].
    
    [1] https://developers.google.com/protocol-buffers/docs/proto3#backwards-compatibility
    [2] https://github.com/jmendeth/protobuf-inspector
    
    Based-on-patch-by: Shrimpz <Shrimpz@qq.com>
    tq-schifferm committed Feb 4, 2020
    Configuration menu
    Copy the full SHA
    6b42837 View commit details
    Browse the repository at this point in the history

Commits on Jul 10, 2020

  1. Configuration menu
    Copy the full SHA
    bcdc1f3 View commit details
    Browse the repository at this point in the history