X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcode%2Ftarget-format.lisp;h=3e62ac0f253e2c5d280077ebf27866cbfa232b0c;hb=bee53328c93be3433477821131ab805557476c8b;hp=13c348053ecffc9dc487aba8ecc5f2c660084a51;hpb=d5aafdd8ab6387e12bac187048ed322bc96fb79a;p=sbcl.git diff --git a/src/code/target-format.lisp b/src/code/target-format.lisp index 13c3480..3e62ac0 100644 --- a/src/code/target-format.lisp +++ b/src/code/target-format.lisp @@ -167,10 +167,15 @@ (write-string string stream)) (dotimes (i minpad) (write-char padchar stream)) - (do ((chars (+ (length string) minpad) (+ chars colinc))) - ((>= chars mincol)) - (dotimes (i colinc) - (write-char padchar stream))) + ;; As of sbcl-0.6.12.34, we could end up here when someone tries to + ;; print e.g. (FORMAT T "~F" "NOTFLOAT"), in which case ANSI says + ;; we're supposed to soldier on bravely, and so we have to deal with + ;; the unsupplied-MINCOL-and-COLINC case without blowing up. + (when (and mincol colinc) + (do ((chars (+ (length string) minpad) (+ chars colinc))) + ((>= chars mincol)) + (dotimes (i colinc) + (write-char padchar stream)))) (when padleft (write-string string stream)))