From ec0a56cb9cb24d1ee884f8259fa7f11f0947502d Mon Sep 17 00:00:00 2001 From: Michael Vines Date: Tue, 27 Nov 2018 09:55:19 -0800 Subject: [PATCH] Tokens are unsigned --- programs/bpf/c/sdk/inc/solana_sdk.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/programs/bpf/c/sdk/inc/solana_sdk.h b/programs/bpf/c/sdk/inc/solana_sdk.h index a09450d4eb..ff50b59492 100644 --- a/programs/bpf/c/sdk/inc/solana_sdk.h +++ b/programs/bpf/c/sdk/inc/solana_sdk.h @@ -111,7 +111,7 @@ SOL_FN_PREFIX bool SolPubkey_same(const SolPubkey *one, const SolPubkey *two) { */ typedef struct { SolPubkey *key; /** Public Key of the account */ - int64_t *tokens; /** Numer of tokens owned by this account */ + uint64_t *tokens; /** Numer of tokens owned by this account */ uint64_t userdata_len; /** Length of userdata in bytes */ uint8_t *userdata; /** On-chain data owned by this account */ SolPubkey *owner; /** Program that owns this account */ @@ -247,8 +247,8 @@ SOL_FN_PREFIX bool sol_deserialize( input += sizeof(SolPubkey); // tokens - ka[i].tokens = (int64_t *) input; - input += sizeof(int64_t); + ka[i].tokens = (uint64_t *) input; + input += sizeof(uint64_t); // account userdata ka[i].userdata_len = *(uint64_t *) input;