From 134da5387304c6b1963bba21f14241402cc085a2 Mon Sep 17 00:00:00 2001 From: "Nathan S. Evans" Date: Thu, 24 Feb 2011 16:36:40 +0000 Subject: [PATCH] fixed divide by zero bug --- src/testing/testing_group.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/testing/testing_group.c b/src/testing/testing_group.c index f1e5ba1e5..5c5f80798 100644 --- a/src/testing/testing_group.c +++ b/src/testing/testing_group.c @@ -1014,6 +1014,8 @@ create_meter(unsigned int total, char * start_string, int print) ret->print = print; ret->total = total; ret->modnum = total / 4; + if (ret->modnum == 0) /* Divide by zero check */ + ret->modnum = 1; ret->dotnum = (total / 50) + 1; if (start_string != NULL) ret->startup_string = GNUNET_strdup(start_string); -- 2.25.1