]> git.eshelyaron.com Git - emacs.git/commitdiff
(shr-make-table-1): Ensure that we don't infloop on degenerate widths.
authorLars Magne Ingebrigtsen <larsi@gnus.org>
Fri, 19 Jul 2013 14:07:43 +0000 (16:07 +0200)
committerLars Magne Ingebrigtsen <larsi@gnus.org>
Fri, 19 Jul 2013 14:07:43 +0000 (16:07 +0200)
lisp/ChangeLog
lisp/net/shr.el

index b78d5587e46c900fef94ce1e6a6410cf3bb2cec4..d583d7f90630679a06045c3522e715ae76ce6b18 100644 (file)
@@ -1,3 +1,8 @@
+2013-07-19  Lars Magne Ingebrigtsen  <larsi@gnus.org>
+
+       * net/shr.el (shr-make-table-1): Ensure that we don't infloop on
+       degenerate widths.
+
 2013-07-19  Richard Stallman  <rms@gnu.org>
 
        * epa.el (epa-popup-info-window): Doc fix.
index 4506ede872229498157d4bb905d5e03e389e88ab..83f7596f34f8df74ac347cb60c62762ccba84762 100644 (file)
@@ -1476,9 +1476,6 @@ ones, in case fg and bg are nil."
                    (if column
                        (aref widths width-column)
                      10))
-             ;; Sanity check for degenerate tables.
-             (when (zerop width)
-               (setq width 10))
              (when (and fill
                         (setq colspan (cdr (assq :colspan (cdr column)))))
                (setq colspan (string-to-number colspan))
@@ -1491,6 +1488,9 @@ ones, in case fg and bg are nil."
                (setq width-column (+ width-column (1- colspan))))
              (when (or column
                        (not fill))
+               ;; Sanity check for degenerate tables.
+               (when (zerop width)
+                 (setq width 10))
                (push (shr-render-td (cdr column) width fill)
                      tds))
              (setq i (1+ i)
@@ -1499,6 +1499,7 @@ ones, in case fg and bg are nil."
     (nreverse trs)))
 
 (defun shr-render-td (cont width fill)
+  (when (= width 0) (debug))
   (with-temp-buffer
     (let ((bgcolor (cdr (assq :bgcolor cont)))
          (fgcolor (cdr (assq :fgcolor cont)))