Frame pointer points to local 0 instead of local 1
[bpt/guile.git] / module / system / vm / frame.scm
index ed042fa..3ab3e1e 100644 (file)
                      (opt (or (assq-ref arguments 'optional) '()))
                      (key (or (assq-ref arguments 'keyword) '()))
                      (rest (or (assq-ref arguments 'rest) #f))
-                     (i 0))
+                     (i 1))
               (cond
                ((pair? req)
                 (cons (binding-ref (car req) i)
        ;; case 2
        (map (lambda (i)
               (frame-local-ref frame i))
-            (iota (frame-num-locals frame))))))))
+            ;; Cdr past the 0th local, which is the procedure.
+            (cdr (iota (frame-num-locals frame)))))))))
 
 
 \f