diff --git a/src/blur.rs b/src/blur.rs index 1170cf4..e28000a 100644 --- a/src/blur.rs +++ b/src/blur.rs @@ -67,7 +67,7 @@ impl Blur { .for_each(|(src_row, dst_row)| { // First we build a value for the beginning of each row. We assume periodic boundary conditions, so we need to push the left index to the opposite side of the row. let width_sub_radius = width - radius; - let mut value = src_row[width - radius - 1]; + let mut value = src_row[width_sub_radius - 1]; for j in 0..radius { value += src_row[width_sub_radius + j] + src_row[j]; }