From 0ddd8b55d756c4af3afbfbb00b4bfce4fd6ff53b Mon Sep 17 00:00:00 2001 From: jrwhite Date: Sun, 11 Mar 2018 14:35:38 -0500 Subject: [PATCH] divide-by-zero fix --- scripts/gdb.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/gdb.py b/scripts/gdb.py index eb28ed8..286627c 100644 --- a/scripts/gdb.py +++ b/scripts/gdb.py @@ -241,7 +241,7 @@ class Target: block = 0 for i in range(len(self.blocks)): block += 1 - if callable(progress_cb): + if callable(progress_cb) and totalblocks > 0: progress_cb(block*100/totalblocks) # Erase the block