ref: 8f7d3a414205a1b9b609b00cb786b4d7d3cac14a
parent: 03359e37ac942bc5d4d0f0f5fb650e15ddeb3bb0
author: Simon Howard <[email protected]>
date: Sat Mar 11 16:28:21 EST 2006
Fix bug with corruption of long player names. Remove tab characters. Subversion-branch: /trunk/chocolate-doom Subversion-revision: 416
--- a/src/net_gui.c
+++ b/src/net_gui.c
@@ -1,7 +1,7 @@
// Emacs style mode select -*- C++ -*-
//-----------------------------------------------------------------------------
//
-// $Id: net_gui.c 335 2006-01-23 00:37:14Z fraggle $
+// $Id: net_gui.c 416 2006-03-11 21:28:21Z fraggle $
//
// Copyright(C) 2005 Simon Howard
//
@@ -144,11 +144,13 @@
if (i < net_clients_in_game)
{
- snprintf(buf, 15, "%s", net_player_names[i]);
+ snprintf(buf, 25, "%s", net_player_names[i]);
+ buf[25] = '\0';
TXT_GotoXY(WINDOW_X + 5, WINDOW_Y + 4 + i);
TXT_Puts(buf);
snprintf(buf, 16, "%s", net_player_addresses[i]);
+ buf[16] = '\0';
TXT_GotoXY(WINDOW_X + 33, WINDOW_Y + 4 + i);
TXT_Puts(buf);
}
@@ -181,12 +183,12 @@
while (net_waiting_for_start)
{
- if (I_GetTimeMS() > last_draw_time + 50)
- {
- ProcessEvents();
+ if (I_GetTimeMS() > last_draw_time + 50)
+ {
+ ProcessEvents();
DrawScreen();
- last_draw_time = I_GetTimeMS();
- }
+ last_draw_time = I_GetTimeMS();
+ }
NET_CL_Run();
NET_SV_Run();