Skip to content

Commit

Permalink
Merge pull request #1 from t-xinlin/master
Browse files Browse the repository at this point in the history
long type encode error
  • Loading branch information
tianxiaoliang authored Dec 20, 2018
2 parents e5130c2 + 3a50ad8 commit 3ab1800
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions encoder.go
Original file line number Diff line number Diff line change
Expand Up @@ -276,11 +276,12 @@ func (e *encoder) writeLong(value int64) (int, error) {
buf[0] = 'L'
buf[1] = byte(value >> 56)
buf[2] = byte(value >> 48)
buf[3] = byte(value >> 32)
buf[4] = byte(value >> 24)
buf[5] = byte(value >> 16)
buf[6] = byte(value >> 8)
buf[7] = byte(value)
buf[3] = byte(value >> 40)
buf[4] = byte(value >> 32)
buf[5] = byte(value >> 24)
buf[6] = byte(value >> 16)
buf[7] = byte(value >> 8)
buf[8] = byte(value)
}
l, err := e.writer.Write(buf)
if err != nil {
Expand Down

0 comments on commit 3ab1800

Please sign in to comment.