summaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
authorReiner Herrmann <reiner@reiner-h.de>2011-01-16 02:46:02 +0100
committerReiner Herrmann <reiner@reiner-h.de>2011-01-16 02:46:02 +0100
commit459a1f83b51a506f538bf495f9a85cf399070a85 (patch)
treedb83a3db0e32bbc2667a02bca99f639e862631bf /src/main.c
parente291d69fa4d865da8c1d6ece46cb149d1cddb9d8 (diff)
need space for nullbyte
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main.c b/src/main.c
index 660e351..8acf5ec 100644
--- a/src/main.c
+++ b/src/main.c
@@ -35,7 +35,7 @@ int main(int argc, char **argv)
csocks = server_get_players(ssock, opponents);
players.count = opponents + 1;
- players.names[0] = malloc(strlen(nickname));
+ players.names[0] = malloc(strlen(nickname)+1);
strcpy(players.names[0], nickname);
for(int i=0; i<opponents; i++)