We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent db929cc commit 56516b8Copy full SHA for 56516b8
data/encode.go
@@ -116,13 +116,10 @@ func encodeMap(m *Map) (any, error) {
116
117
// encodeInteger encodes an Integer to CBOR format.
118
func encodeInteger(i *Integer) (any, error) {
119
- // For small integers, encode directly
+ // Encode directly for values that fit in int64
120
if i.Inner.IsInt64() {
121
val := i.Inner.Int64()
122
- // Check if it fits in the standard CBOR integer range
123
- if val >= -2147483648 && val <= 2147483647 {
124
- return val, nil
125
- }
+ return val, nil
126
}
127
128
// For large integers, use CBOR bignum tags
0 commit comments