Skip to content

Commit 98bf7e8

Browse files
author
Jeff Yanta
committed
Update padding position in memory account
1 parent 69085d2 commit 98bf7e8

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pkg/solana/cvm/accounts_memory_account.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,8 @@ const MemoryAccountSize = (8 + // discriminator
3232
32 + // vm
3333
MaxMemoryAccountNameLength + // name
3434
1 + // bump
35-
1 + // layout
36-
6) // padding
35+
6 + // padding
36+
1) // layout
3737

3838
var MemoryAccountDiscriminator = []byte{byte(AccountTypeMemory), 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
3939

@@ -53,8 +53,8 @@ func (obj *MemoryAccount) Unmarshal(data []byte) error {
5353
getKey(data, &obj.Vm, &offset)
5454
getFixedString(data, &obj.Name, MaxMemoryAccountNameLength, &offset)
5555
getUint8(data, &obj.Bump, &offset)
56-
getMemoryLayout(data, &obj.Layout, &offset)
5756
offset += 6 // padding
57+
getMemoryLayout(data, &obj.Layout, &offset)
5858

5959
return nil
6060
}

0 commit comments

Comments
 (0)