fixed some minor bugs

This commit is contained in:
demattia 2004-10-10 13:19:55 +00:00
parent 9e9294231e
commit 5a249d54d4
1 changed files with 7 additions and 5 deletions

View File

@ -356,11 +356,13 @@
(lambda (num-cols pos-col line)
(let* ((lines (ceiling (/ (string-length line) num-cols)))
(end-pos (* lines num-cols)))
(let loop ((offset 0)
(end end-pos))
(if (< (+ end 2) pos-col)
(- offset 1)
(loop (+ offset 1) (- end num-cols)))))))
(if (= (string-length line) 0)
0
(let loop ((offset 0)
(end end-pos))
(if (<= (+ end 2) pos-col)
(- offset 1)
(loop (+ offset 1) (- end num-cols))))))))