diff options
Diffstat (limited to 'src/net_client.c')
| -rw-r--r-- | src/net_client.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/net_client.c b/src/net_client.c index 9134cf7..a225529 100644 --- a/src/net_client.c +++ b/src/net_client.c @@ -110,14 +110,16 @@ player_list* client_recv_player_list(const uint8_t* payload, const uint8_t data_ return players; } -hand* client_recv_deal_cards(const uint8_t* payload, const uint8_t payload_len) +hand_t *client_recv_deal_cards(const uint8_t* payload, const uint8_t payload_len) { - hand* h = malloc(sizeof(hand)); + hand_t *h = malloc(sizeof(hand_t)); assert(payload_len == MAX_HAND_CARDS); // deal_cards packet have fixed size for(int i=0; i<MAX_HAND_CARDS; i++) - *h[i] = payload[i]; + { + h->cards[i] = payload[i]; + } return h; } |
