[cxml-devel] Possible bug in rune-dom::adjust-vector-exponentially
![](https://secure.gravatar.com/avatar/093007b9abe3fff5a08f193dcf1b32cf.jpg?s=120&d=mm&r=g)
Hi, I have a process that is stuck in the following function: ;; from dom-impl.lisp (defun adjust-vector-exponentially (vector new-dimension set-fill-pointer-p) (let ((d (array-dimension vector 0))) (when (< d new-dimension) (loop do (setf d (* 2 d)) while (< d new-dimension)) (adjust-array vector d)) (when set-fill-pointer-p (setf (fill-pointer vector) new-dimension)))) Apparently, adjust-vector-exponentially assumes d > 0, but this function has been called from (METHOD SAX:CHARACTERS (RUNE-DOM::DOM-BUILDER T)) with an empty string (d = 0). The loop obviously shows it will never exit the function. Adding the following before the loop statement fixes the problem: (when (= d 0) (incf d)) Best Regards, Camille
participants (1)
-
Camille Troillard