diff --git a/convert.lisp b/convert.lisp index c2683ae..63024d6 100644 --- a/convert.lisp +++ b/convert.lisp @@ -633,7 +633,7 @@ when NAME is not NIL." ;; the same name and collect their respective numbers (loop for name in reg-names for reg-index from 0 - when (string= name backref-name) + when (and (stringp name) (string= name backref-name)) ;; NOTE: REG-NAMES stores register names in reversed ;; order REG-NUM contains number of (any) registers ;; seen so far; 1- will be done later diff --git a/test/simple b/test/simple index 8c86c34..dba5104 100644 --- a/test/simple +++ b/test/simple @@ -364,3 +364,13 @@ characters if there's a match." (regex-replace-all (create-scanner "\\p{even}") "abcd" "+") (regex-replace-all (create-scanner "\\p{true}") "abcd" "+"))) '("+b+d" "a+c+" "++++"))) + +(handler-case + (progn + (scan '(:sequence + (:register "f") + (:register "o") + (:back-reference "NIL")) + "foo") + nil) + (error () t))