diff options
-rw-r--r-- | erts/emulator/drivers/common/inet_drv.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/erts/emulator/drivers/common/inet_drv.c b/erts/emulator/drivers/common/inet_drv.c index 5f8837fd4f..c284a8aa86 100644 --- a/erts/emulator/drivers/common/inet_drv.c +++ b/erts/emulator/drivers/common/inet_drv.c @@ -7885,7 +7885,7 @@ static ErlDrvSSizeT inet_ctl(inet_descriptor* desc, int cmd, char* buf, static void inet_output_count(inet_descriptor* desc, ErlDrvSizeT len) { unsigned long n = desc->send_cnt + 1; - unsigned long t = desc->send_oct[0] + len; + unsigned long t = (desc->send_oct[0] + len) & 0xFFFFFFFFUL; int c = (t < desc->send_oct[0]); double avg = desc->send_avg; @@ -7905,7 +7905,7 @@ static void inet_output_count(inet_descriptor* desc, ErlDrvSizeT len) static void inet_input_count(inet_descriptor* desc, ErlDrvSizeT len) { unsigned long n = desc->recv_cnt + 1; - unsigned long t = desc->recv_oct[0] + len; + unsigned long t = (desc->recv_oct[0] + len) & 0xFFFFFFFFUL; int c = (t < desc->recv_oct[0]); double avg = desc->recv_avg; double dvi; |