From f5a83863e86192b1a9a47ea84eb95d4dbbdb9dd6 Mon Sep 17 00:00:00 2001 From: Luke Kenneth Casson Leighton Date: Thu, 20 Feb 2020 20:06:25 +0000 Subject: [PATCH] stop at end of mask index --- src/ieee754/part_mul_add/partpoints.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ieee754/part_mul_add/partpoints.py b/src/ieee754/part_mul_add/partpoints.py index efc55e41..e138490b 100644 --- a/src/ieee754/part_mul_add/partpoints.py +++ b/src/ieee754/part_mul_add/partpoints.py @@ -18,7 +18,7 @@ def make_partition(mask, width): mlen = mask.shape()[0] ppos = mlen midx = 0 - while ppos < width-1: # -1, ignore last bit + while ppos < width and midx < mlen: # -1, ignore last bit ppoints[ppos] = mask[midx] ppos += mlen midx += 1 -- 2.30.2