Fix transform for SEARCH on vectors with :form-end t.
[sbcl.git] / src / compiler / seqtran.lisp
index f87bd78..5181c06 100644 (file)
                   (unless (<= start2 end2 len2)
                     (oops pattern start2 end2))))
             (when (= end1 start1)
-              (return-from search start2))
+              (return-from search (if from-end
+                                      end2
+                                      start2)))
             (do (,(if from-end
                       '(index2 (- end2 (- end1 start1)) (1- index2))
                       '(index2 start2 (1+ index2))))