I found a bug in lispbuilder-sdl/sdl/surfaces.lisp, function (setf cells)
specialized on (integer sdl-surface). The code would make all cells share one
rectangle object, so changes in one cell will be reflected in all others.
The fix (against latest SVN trunk):
diff --git a/lispbuilder-sdl/sdl/surfaces.lisp
b/lispbuilder-sdl/sdl/surfaces.lisp
index c71c55f..e944617 100644
--- a/lispbuilder-sdl/sdl/surfaces.lisp
+++ b/lispbuilder-sdl/sdl/surfaces.lisp
@@ -152,7 +152,8 @@ Free using [FREE](#free)."))
,body-value))))
(defmethod (setf cells) ((num integer) (self sdl-surface))
- (setf (slot-value self 'cells) (make-array num :initial-element
(get-rectangle-* self)))
+ (setf (slot-value self 'cells) (make-array num :initial-contents (loop
repeat num
+
collect (get-rectangle-* self))))
(setf (cell-index self) 0))
(defmethod (setf cells) ((rects list) (self sdl-surface))
Original issue reported on code.google.com by
[email protected]on 19 Jun 2012 at 9:02