From 51e80cb165b7f4a1e096a1722a058d05c2cf8f74 Mon Sep 17 00:00:00 2001 From: Rob Swindell <rob@synchro.net> Date: Wed, 23 Feb 2022 22:02:46 -0800 Subject: [PATCH] Fix potential divide by zero CID 330961 --- src/sbbs3/bat_xfer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sbbs3/bat_xfer.cpp b/src/sbbs3/bat_xfer.cpp index b173613c1f..7a7edcf944 100644 --- a/src/sbbs3/bat_xfer.cpp +++ b/src/sbbs3/bat_xfer.cpp @@ -703,7 +703,7 @@ bool sbbs_t::addtobatdl(file_t* f) bprintf(text[FileAddedToBatDlQueue] ,f->name, strListCount(filenames) + 1, cfg.max_batdn, ultoac((ulong)totalcost,tmp) ,ultoac((ulong)totalsize,tmp2) - ,sectostr((ulong)totalsize/(ulong)cur_cps,str)); + ,sectostr((ulong)totalsize/max((ulong)cur_cps, 1),str)); result = true; } } -- GitLab