-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Open
Description
It seems like ImplTryReadUInt32VarintWithoutMoving should not throw OverflowException when it encounters int64:
state.ThrowOverflow(); |
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
Labels
No labels