X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fngircd%2Fconn.c;h=6956776914ada5fe974c70fc52003d2bc3ef08ec;hb=c97fb2e93e9c7d66b1ce70fa681a762d1f430521;hp=e211d1841cc1167719bbd19dcc936d9d091f7ffb;hpb=e8e04b4c8fd63d075ffa6b85327c4b90d7005051;p=ngircd-alex.git 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 );