Commit 3ccfa82a authored by Stefan Monnier's avatar Stefan Monnier
Browse files

(regexp-opt-depth): Fix off-by-two error.

parent d28981c9
......@@ -120,7 +120,9 @@ in REGEXP."
(let ((count 0) start)
(while (string-match "\\(\\`\\|[^\\]\\)\\\\\\(\\\\\\\\\\)*([^?]"
regexp start)
(setq count (1+ count) start (match-end 0)))
(setq count (1+ count)
;; Go back 2 chars (one for [^?] and one for [^\\]).
start (- (match-end 0) 2))
count)))
;;; Workhorse functions.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment