diff options
| author | Mario Kilies <MarioKilies@GMX.net> | 2011-01-16 08:41:04 +0100 |
|---|---|---|
| committer | Mario Kilies <MarioKilies@GMX.net> | 2011-01-16 08:41:04 +0100 |
| commit | 4b9e56ebf47db8be740f4ff2a4b9fceb9f143055 (patch) | |
| tree | d6a31f6e068914a2ec1820da594c9d1c5ea2604e /src/player.c | |
| parent | fac5e3de0929c3abb73da552efbda6d641136588 (diff) | |
Refactored cardstack and tablestacks to card_stack_t and table_stacks_t, that both now are defined as structs rather than arrays. Inserted lots of assert() calls to functions that take pointers as arguments.
Diffstat (limited to 'src/player.c')
| -rw-r--r-- | src/player.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/player.c b/src/player.c index ee21245..28914d4 100644 --- a/src/player.c +++ b/src/player.c @@ -1,6 +1,7 @@ #include "player.h" #include <stdlib.h> #include <string.h> +#include <assert.h> player_list* create_playerlist(void) { @@ -12,8 +13,9 @@ player_list* create_playerlist(void) void cleanup_playerlist(player_list* pl) { + assert(pl != NULL); + for(int i=0; i<MAX_PLAYERS; i++) free(pl->names[i]); free(pl); } - |
