X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?p=ngircd-alex.git;a=blobdiff_plain;f=src%2Fngircd%2Fconn.c;h=6956776914ada5fe974c70fc52003d2bc3ef08ec;hp=e211d1841cc1167719bbd19dcc936d9d091f7ffb;hb=c8162a80beba80f3b1d04fdba8e74bf5366c47f7;hpb=e8e04b4c8fd63d075ffa6b85327c4b90d7005051 diff --git a/src/ngircd/conn.c b/src/ngircd/conn.c index e211d184..69567769 100644 --- a/src/ngircd/conn.c +++ b/src/ngircd/conn.c @@ -1081,9 +1081,9 @@ Conn_Close(CONN_ID Idx, const char *LogMsg, const char *FwdMsg, bool InformClien * the calculation of in_p and out_p: in_z_k and out_z_k * are non-zero, that's guaranteed by the protocol until * compression can be enabled. */ - if (! in_z_k) + if (in_z_k <= 0) in_z_k = in_k; - if (! out_z_k) + if (out_z_k <= 0) out_z_k = out_k; in_p = (int)(( in_k * 100 ) / in_z_k ); out_p = (int)(( out_k * 100 ) / out_z_k );