Skip to content

protobuf-net does not conform protobuf spec #746

@Radrik5

Description

@Radrik5

It seems like ImplTryReadUInt32VarintWithoutMoving should not throw OverflowException when it encounters int64:

According to protobuf docs:

int32, uint32, int64, uint64, and bool are all compatible – this means you can change a field from one of these types to another without breaking forwards- or backwards-compatibility. If a number is parsed from the wire which doesn't fit in the corresponding type, you will get the same effect as if you had cast the number to that type in C++ (e.g. if a 64-bit number is read as an int32, it will be truncated to 32 bits).
sint32 and sint64 are compatible with each other but are not compatible with the other integer types.

https://developers.google.com/protocol-buffers/docs/proto#updating

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions