Skip to content

Commit

Permalink
merge.go: fix buf with overwriting PAD tags
Browse files Browse the repository at this point in the history
  • Loading branch information
Ivan Kruglov committed Jul 6, 2014
1 parent f9cbafb commit ac065f3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Go/sereal/merge.go
Expand Up @@ -192,8 +192,8 @@ func (m *Merger) Finish() ([]byte, error) {

if !m.finished {
lengthVarInt := make([]byte, 8, 8)
copyVarint(lengthVarInt, 0, uint(m.length))
copy(m.buf[m.lenOffset:], lengthVarInt)
sz := copyVarint(lengthVarInt, 0, uint(m.length))
copy(m.buf[m.lenOffset:], lengthVarInt[:sz])
m.finished = true
}

Expand Down

0 comments on commit ac065f3

Please sign in to comment.