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.
This commit is contained in:
Marius Gerbershagen 2023-02-15 21:34:02 +01:00
parent 4831831f74
commit a5cb93d311

View file

@ -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)))