Skip to content

Commit

Permalink
bug fix prepending length
Browse files Browse the repository at this point in the history
  • Loading branch information
sh-cha committed Aug 7, 2024
1 parent d3a5641 commit 1aa25d5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion executor/batch/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
// prependLength prepends the length of the data to the data.
func prependLength(data []byte) []byte {
lengthBytes := make([]byte, 8)
binary.LittleEndian.PutUint64(lengthBytes, uint64(len(lengthBytes)))
binary.LittleEndian.PutUint64(lengthBytes, uint64(len(data)))
return append(lengthBytes, data...)
}

Expand Down

0 comments on commit 1aa25d5

Please sign in to comment.