diff --git a/src/pkg/gob/encode.go b/src/pkg/gob/encode.go index 941e26052fd..78455981ebc 100644 --- a/src/pkg/gob/encode.go +++ b/src/pkg/gob/encode.go @@ -62,7 +62,7 @@ func (state *encoderState) encodeUint(x uint64) { var n, m int m = uint64Size for n = 1; x > 0; n++ { - state.buf[m] = uint8(x & 0xFF) + state.buf[m] = uint8(x) x >>= 8 m-- }