aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian Cully <bjc@kublai.com>2021-02-21 12:14:51 -0500
committerBrian Cully <bjc@kublai.com>2021-02-21 12:18:52 -0500
commit85b96b90393c39ca62b1f0b3ab0ed769d97973c9 (patch)
treee84a2967e5cdb87fffc2e1225bae86bc2d90dd67
parent63ef5484351e7fdf1bfa87b04f16be0dfee02007 (diff)
downloadflymake-rust-85b96b90393c39ca62b1f0b3ab0ed769d97973c9.tar.gz
flymake-rust-85b96b90393c39ca62b1f0b3ab0ed769d97973c9.zip
Fix off-by-one error for byte start/end.
-rw-r--r--flymake-rust.el4
1 files changed, 2 insertions, 2 deletions
diff --git a/flymake-rust.el b/flymake-rust.el
index 3b76ecb..f04051a 100644
--- a/flymake-rust.el
+++ b/flymake-rust.el
@@ -76,8 +76,8 @@ Returns a sequence of data in the form of (BYTE-START . BYTE-END)
If any data are not available, nil will be used in its place."
(let* ((spans (or (gethash "spans" hash) [])))
(mapcar (lambda (span)
- (let ((byte-start (or (gethash "byte_start" span) nil))
- (byte-end (or (gethash "byte_end" span) nil)))
+ (let ((byte-start (or (1+ (gethash "byte_start" span)) nil))
+ (byte-end (or (1+ (gethash "byte_end" span)) nil)))
`(,byte-start . ,byte-end)))
spans)))