[bknr-cvs] r1943 - trunk/bknr/src/images

bknr at bknr.net bknr at bknr.net
Mon Apr 17 04:34:04 UTC 2006


Author: troussanov
Date: 2006-04-17 00:34:03 -0400 (Mon, 17 Apr 2006)
New Revision: 1943

Modified:
   trunk/bknr/src/images/image-tags.lisp
Log:
Fix the use of indeces in subseq calls. SBCL signals an error SB-KERNEL:BOUNDING-INDICES-BAD-ERROR. CMUCL does not implement the range checks as specified in:
The ANSI Standard, writeup for Issue SUBSEQ-OUT-OF-BOUNDS:IS-AN-ERROR


Modified: trunk/bknr/src/images/image-tags.lisp
===================================================================
--- trunk/bknr/src/images/image-tags.lisp	2006-03-28 13:22:02 UTC (rev 1942)
+++ trunk/bknr/src/images/image-tags.lisp	2006-04-17 04:34:03 UTC (rev 1943)
@@ -129,8 +129,13 @@
 		    :value "Unselect all images"
 		    :onClick "check(this,'image-id',false);"))
 	   ((:table :class "images")
-	    (loop for image-row on images by #'(lambda (seq) (subseq seq 5))
-		  do (html (:tr (loop for image in (subseq image-row 0 5)
+	    (loop for image-row on images by #'(lambda (seq)
+						 (if (> (length seq) 5)
+						     (subseq seq 5)
+						     nil))
+		  do (html (:tr (loop for image in (if (> (length image-row) 5)
+						       (subseq image-row 0 5)
+						       image-row)
 				      for image-id = (store-object-id image)
 				      for image-name = (store-image-name image)
 				      do (html ((:td)




More information about the Bknr-cvs mailing list