diff options
Diffstat (limited to 'codec')
-rw-r--r-- | codec/codec.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/codec/codec.go b/codec/codec.go index 3ae578b..21354a1 100644 --- a/codec/codec.go +++ b/codec/codec.go @@ -156,12 +156,12 @@ func (b *Buffer) DecodeInt64() int64 { } func (b *Buffer) EncodeFloat64(v float64) { - binary.BigEndian.PutUint64(b.buf[b.pos:b.pos+8], math.Float64bits(v)) + binary.LittleEndian.PutUint64(b.buf[b.pos:b.pos+8], math.Float64bits(v)) b.pos += 8 } func (b *Buffer) DecodeFloat64() float64 { - v := math.Float64frombits(binary.BigEndian.Uint64(b.buf[b.pos : b.pos+8])) + v := math.Float64frombits(binary.LittleEndian.Uint64(b.buf[b.pos : b.pos+8])) b.pos += 8 return v } |