Skip to content

Commit

Permalink
fix reaching the max alloc size with the custom gc
Browse files Browse the repository at this point in the history
  • Loading branch information
radkomih committed Aug 31, 2023
1 parent 9b6f9f8 commit 227ebb6
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 227ebb6

Please sign in to comment.