From 85b96b90393c39ca62b1f0b3ab0ed769d97973c9 Mon Sep 17 00:00:00 2001 From: Brian Cully Date: Sun, 21 Feb 2021 12:14:51 -0500 Subject: Fix off-by-one error for byte start/end. --- flymake-rust.el | 4 ++-- 1 file 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))) -- cgit v1.2.3