From 755da2fc99bc7be729c6b4a7d93afefe14c94ad6 Mon Sep 17 00:00:00 2001 From: Marius Vollmer Date: Fri, 6 Jun 1997 15:14:55 +0000 Subject: [PATCH] * boot-9.scm (struct-printer): Bugfix: Check the layout of the vtable and not the one of the struct. --- ice-9/boot-9.scm | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/ice-9/boot-9.scm b/ice-9/boot-9.scm index 03bd5ef9f..7cc4a41b8 100644 --- a/ice-9/boot-9.scm +++ b/ice-9/boot-9.scm @@ -332,11 +332,12 @@ (define %struct-printer-tag (cons '%struct-printer-tag #f)) (define (struct-printer s) - (and (>= (string-length (struct-layout s)) - (* 2 struct-vtable-offset)) - (let ((p (struct-ref (struct-vtable s) struct-vtable-offset))) - (and (eq? (car p) %struct-printer-tag) - (cdr p))))) + (let ((vtable (struct-vtable s))) + (and (>= (string-length (struct-layout vtable)) + (* 2 struct-vtable-offset)) + (let ((p (struct-ref vtable struct-vtable-offset))) + (and (eq? (car p) %struct-printer-tag) + (cdr p)))))) (define (make-struct-printer printer) (cons %struct-printer-tag printer)) -- 2.20.1