CruceGameDevel / CruceGame

Open source card game
GNU General Public License v2.0
19 stars 19 forks source link

Issue 144 #165

Closed YoNuTzZ closed 10 years ago

YoNuTzZ commented 10 years ago

Change the declaration of the name member inside Player structure form const char *name to char *name. The memory for player's name is allocated dynamically inside team_createPlayer function and the content of the name argument is copied to newPlayer->name. The name variable in the function newPlayer is dealocated. Also, when a player is deleted the memory occupied by it's name is dealocated.