Skip to content

Commit

Permalink
fix reaching the max alloc size with the custom gc (#78)
Browse files Browse the repository at this point in the history
  • Loading branch information
radkomih authored Aug 31, 2023
1 parent 9b6f9f8 commit 09f87c3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion fixed_length.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,9 @@ import (
)

func (value U8) Encode(buffer *bytes.Buffer) {
// do not use value.Bytes() here: https://github.com/LimeChain/goscale/issues/77
encoder := Encoder{Writer: buffer}
encoder.Write(value.Bytes())
encoder.EncodeByte(byte(value))
}

func (value U8) Bytes() []byte {
Expand Down

0 comments on commit 09f87c3

Please sign in to comment.