]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - host_cmd.c
patch from div0: clamp "ping" reply valies in 0..9999 to prevent misparsing in case...
[xonotic/darkplaces.git] / 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)