emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/geiser-racket 2e9ecf7 005/191: Racket: off-by-one bug in m


From: Philip Kaludercic
Subject: [nongnu] elpa/geiser-racket 2e9ecf7 005/191: Racket: off-by-one bug in module name completions
Date: Sun, 1 Aug 2021 18:31:49 -0400 (EDT)

branch: elpa/geiser-racket
commit 2e9ecf71b5b68b052a4bd5ecb23903c8590cb4cf
Author: Jose Antonio Ortega Ruiz <jao@gnu.org>
Commit: Jose Antonio Ortega Ruiz <jao@gnu.org>

    Racket: off-by-one bug in module name completions
---
 geiser/modules.rkt | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/geiser/modules.rkt b/geiser/modules.rkt
index 0de316c..95219ed 100644
--- a/geiser/modules.rkt
+++ b/geiser/modules.rkt
@@ -90,8 +90,9 @@
   (let ((ext (filename-extension path)))
     (and ext
          (or (bytes=? ext #"rkt") (bytes=? ext #"ss"))
-         (let ((path (path->string path)))
-           (substring path 0 (- (string-length path) 3))))))
+         (let* ((path (path->string path))
+                (len (- (string-length path) (bytes-length ext) 1)))
+           (substring path 0 len)))))
 
 (define (visit-module-path path kind acc)
   (case kind



reply via email to

[Prev in Thread] Current Thread [Next in Thread]