From a5cb93d311d6dc5fe8da2ee6d5d184ec77f71872 Mon Sep 17 00:00:00 2001 From: Marius Gerbershagen Date: Wed, 15 Feb 2023 21:34:02 +0100 Subject: [PATCH] clos: fix computation of instance size For empty structs, the size was off by one. While this did not affect structs that were created directly with the structure constructor, for structs that were externalized with MAKE-LOAD-FORM-SAVING-SLOTS instances which were one element too large were created. --- src/clos/standard.lsp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/clos/standard.lsp b/src/clos/standard.lsp index 9075ef10f..1da4ef613 100644 --- a/src/clos/standard.lsp +++ b/src/clos/standard.lsp @@ -87,7 +87,7 @@ (defun compute-instance-size (slots) (loop for slotd in slots - with last-location = 0 + with last-location = -1 with num-slots = 0 when (eq (slot-definition-allocation slotd) :instance) do (let ((new-loc (safe-slot-definition-location slotd)))