[ab] [BUG] DRAW-LINE-* expecting fixnum where it should not?
Samium Gromoff
_deepfire at feelingofgreen.ru
Fri Feb 2 19:56:49 CST 2007
At Sat, 03 Feb 2007 04:50:42 +0300,
Samium Gromoff wrote:
>
> I call draw-line-* like this:
>
> (sdl:draw-line-* x y x1 y1 :surface some-surface
> :color (sdl:color :r 200 :g 50 :b 50))
>
> and it goes down on me like that:
>
> The value 3358733055 is not of type FIXNUM.
> BREAK was entered because of *BREAK-ON-SIGNALS* (now rebound to NIL).
> [Condition of type SIMPLE-CONDITION]
Here's a patch:
diff -urN lispbuilder-new/trunk/lispbuilder-sdl/sdl/drawing-primitives.lisp lispbuilder-ultranew/trunk/lispbuilder-sdl/sdl/drawing-primitives.lisp
--- lispbuilder-new/trunk/lispbuilder-sdl/sdl/drawing-primitives.lisp 2007-02-02 22:51:53.000000000 +0300
+++ lispbuilder-ultranew/trunk/lispbuilder-sdl/sdl/drawing-primitives.lisp 2007-02-03 01:49:48.000000000 +0300
@@ -263,7 +263,8 @@
;; draw line with Bresenham algorithm
(let ((x 0) (y 0) (e 0) (dx 0) (dy 0)
(color (map-color color surface)))
- (declare (type fixnum x y dx dy color))
+ (declare (type fixnum x y dx dy)
+ (type (unsigned-byte 32) color))
(when (> x0 x1)
(rotatef x0 x1)
(rotatef y0 y1))
More information about the application-builder
mailing list