ref: ac37ee17e8718cfe88e0adb5c972965f7e4d2c00
parent: 379d372c65dee97d13b9a490c7c7a1a466478b7f
author: Simon Howard <[email protected]>
date: Sun Oct 23 18:20:27 EDT 2011
Fix player name input box in multiplayer configuration. Subversion-branch: /branches/v2-branch Subversion-revision: 2465
--- a/src/setup/multiplayer.c
+++ b/src/setup/multiplayer.c
@@ -24,6 +24,8 @@
#include <string.h>
#include "doomtype.h"
+#include "doomfeatures.h"
+
#include "textscreen.h"
#include "d_iwad.h"
@@ -983,17 +985,17 @@
{
if (net_player_name == NULL)
{
- net_player_name = getenv("USER");
+ net_player_name = strdup(getenv("USER"));
}
if (net_player_name == NULL)
{
- net_player_name = getenv("USERNAME");
+ net_player_name = strdup(getenv("USERNAME"));
}
if (net_player_name == NULL)
{
- net_player_name = "player";
+ net_player_name = strdup("player");
}
}