Index: code/ui/ui_main.c =================================================================== --- code/ui/ui_main.c (revision 1788) +++ code/ui/ui_main.c (working copy) @@ -116,8 +116,9 @@ static char* netnames[] = { "???", "UDP", - NULL + "UDP6" }; +static const int numNetnames = sizeof(netnames) / sizeof(char*); #ifndef MISSIONPACK static char quake3worldMessage[] = "Visit www.quake3world.com - News, Community, Events, Files"; @@ -4307,9 +4308,15 @@ return Info_ValueForKey(info, "addr"); } else { if ( ui_netSource.integer == AS_LOCAL ) { + int nettype = atoi(Info_ValueForKey(info, "nettype")); + + if (nettype < 0 || nettype >= numNetnames) { + nettype = 0; + } + Com_sprintf( hostname, sizeof(hostname), "%s [%s]", Info_ValueForKey(info, "hostname"), - netnames[atoi(Info_ValueForKey(info, "nettype"))] ); + netnames[nettype] ); return hostname; } else {