Skip to content

Commit

Permalink
Merge pull request #7 from initia-labs/bug/prepend-length
Browse files Browse the repository at this point in the history
bug fix prepending length
  • Loading branch information
beer-1 authored Aug 7, 2024
2 parents d3a5641 + 1aa25d5 commit 048b675
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 048b675

Please sign in to comment.