Segfault fixed. Yes, I know I'm stupid ;P

This commit is contained in:
Brian Koropoff 2000-05-25 03:57:25 +00:00
parent af98ae5fa5
commit ab1aadfe64

View file

@ -1242,10 +1242,10 @@ void M_SEdit_Key (int key) {
break;
case K_ENTER:
c = SL_Get_By_Num(slist,m_multip_cursor);
free(c->server);
free(c->desc);
c->server = malloc(strlen(serv) + 1);
c->desc = malloc(strlen(desc) + 1);
Z_Free(c->server);
Z_Free(c->desc);
c->server = Z_Malloc(strlen(serv) + 1);
c->desc = Z_Malloc(strlen(desc) + 1);
strcpy(c->server,serv);
strcpy(c->desc,desc);
M_Menu_MultiPlayer_f ();