]> git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
patch from div0: clamp "ping" reply valies in 0..9999 to prevent misparsing in case...
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Mon, 14 Aug 2006 22:55:34 +0000 (22:55 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Mon, 14 Aug 2006 22:55:34 +0000 (22:55 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@6556 d7cf8633-e32d-0410-b094-e92efae38249

host_cmd.c

index d3aed4586a9cd01440747134d5e7528a9fc89bc1..f3585d60b675b38a177fdd937c3294c0ba2dfa09 100644 (file)
@@ -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)