From: Chris Hanson <org/chris-hanson/cph>
Date: Fri, 7 Oct 1988 22:38:13 +0000 (+0000)
Subject: Fix bug in `h' command when first subproblem had wraparound in
X-Git-Tag: 20090517-FFI~12520
X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=534b5562f70d0565bb9a6ce8f75a2b0113642b2e;p=mit-scheme.git

Fix bug in `h' command when first subproblem had wraparound in
reductions.
---

diff --git a/v7/src/runtime/debug.scm b/v7/src/runtime/debug.scm
index 86573c634..c6b9892f1 100644
--- a/v7/src/runtime/debug.scm
+++ b/v7/src/runtime/debug.scm
@@ -1,6 +1,6 @@
 #| -*-Scheme-*-
 
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/runtime/debug.scm,v 14.4 1988/08/01 23:08:34 cph Exp $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/runtime/debug.scm,v 14.5 1988/10/07 22:38:13 cph Exp $
 
 Copyright (c) 1988 Massachusetts Institute of Technology
 
@@ -211,7 +211,10 @@ MIT in each case. |#
 			    (reduction-environment reduction)))))
 		    (print-reduction (car reductions))
 		    (if (= level 0)
-			(for-each print-reduction (cdr reductions))))
+			(let loop ((reductions (cdr reductions)))
+			  (if (pair? reductions)
+			      (begin (print-reduction (car reductions))
+				     (loop (cdr reductions)))))))
 		  (with-values
 		      (lambda () (stack-frame/debugging-info frame))
 		    (lambda (expression environment)