Fix offset print writing to non-erased area
@@ -107,7 +107,8 @@ impl Flash {
for (i, x) in &mut self.write_safe[offset .. offset + payload.len()].iter_mut().enumerate() {
if !(*x) {
- bail!(ewrite(format!("Write to unerased location at 0x{:x}", i)));
+ bail!(ewrite(format!("Write to unerased location at 0x{:x}",
+ offset + i)));
}
*x = false;
}
