diff --git a/bin/src/modules/hook/error/mod.rs b/bin/src/modules/hook/error/mod.rs index 2595f64d..bcccbb47 100644 --- a/bin/src/modules/hook/error/mod.rs +++ b/bin/src/modules/hook/error/mod.rs @@ -13,7 +13,8 @@ fn get_offset(content: &str, location: Position) -> usize { if i + 1 == location.line().expect("location should have a line number") { offset += location .position() - .expect("location should have a column number") - 1; + .expect("location should have a column number") + - 1; break; } offset += line.len() + 1;