From c8a752c0764c484a3a135b3239c37ed6713286cf Mon Sep 17 00:00:00 2001 From: havoc Date: Mon, 14 Aug 2006 22:55:34 +0000 Subject: [PATCH] patch from div0: clamp "ping" reply valies in 0..9999 to prevent misparsing in case of uninitialized ping values git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@6556 d7cf8633-e32d-0410-b094-e92efae38249 --- host_cmd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/host_cmd.c b/host_cmd.c index d3aed458..f3585d60 100644 --- a/host_cmd.c +++ b/host_cmd.c @@ -244,7 +244,7 @@ void Host_Ping_f (void) { if (!client->active) continue; - print("%4i %s\n", (int)floor(client->ping*1000+0.5), client->name); + print("%4i %s\n", bound(0, (int)floor(client->ping*1000+0.5), 9999), client->name); } // now call the Pings command also, which will send a report that contains packet loss for the scoreboard (as well as a simpler ping report) -- 2.39.2