Skip to content

Commit

Permalink
Remove redundant append
Browse files Browse the repository at this point in the history
  • Loading branch information
at-wat authored Feb 19, 2024
1 parent 3fa66ab commit 98735d0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion value.go
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ func encodeString(i interface{}, n uint64) ([]byte, error) {
return []byte{}, wrapErrorf(ErrInvalidType, "writing %T as string", i)
}
if uint64(len(v)) >= n {
return append([]byte(v)), nil
return []byte(v), nil
}
return append([]byte(v), bytes.Repeat([]byte{0x00}, int(n)-len(v))...), nil
}
Expand Down

0 comments on commit 98735d0

Please sign in to comment.