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

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

[nongnu] elpa/nix-mode 0950294c48 04/14: Fix out-of-bounds error


From: ELPA Syncer
Subject: [nongnu] elpa/nix-mode 0950294c48 04/14: Fix out-of-bounds error
Date: Tue, 19 Jul 2022 01:58:49 -0400 (EDT)

branch: elpa/nix-mode
commit 0950294c482c46cc927f661d062f102162b4a59a
Author: Nicholas Coltharp <coltharp@pdx.edu>
Commit: Nicholas Coltharp <coltharp@pdx.edu>

    Fix out-of-bounds error
---
 nix-mode.el | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/nix-mode.el b/nix-mode.el
index 14f0b96060..8d00fa2f99 100644
--- a/nix-mode.el
+++ b/nix-mode.el
@@ -247,7 +247,7 @@ STRING-TYPE type of string based off of Emacs syntax table 
types"
           (cond
            ((member str-peek '("${" "\\n" "\\r" "\\t"))
             (goto-char (+ 2 end)))
-           ((equal (substring str-peek 0 1) "$")
+           ((string-prefix-p "$" str-peek)
             (goto-char (+ 1 end)))
            (t
             (nix--mark-string (1- end) ?\'))))))))



reply via email to

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