emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] trunk r113460: (shr-make-table-1): Ensure that we don't in


From: Lars Ingebrigtsen
Subject: [Emacs-diffs] trunk r113460: (shr-make-table-1): Ensure that we don't infloop on degenerate widths.
Date: Fri, 19 Jul 2013 14:07:47 +0000
User-agent: Bazaar (2.6b2)

------------------------------------------------------------
revno: 113460
revision-id: address@hidden
parent: address@hidden
committer: Lars Magne Ingebrigtsen <address@hidden>
branch nick: trunk
timestamp: Fri 2013-07-19 16:07:43 +0200
message:
  (shr-make-table-1): Ensure that we don't infloop on degenerate widths.
modified:
  lisp/ChangeLog                 changelog-20091113204419-o5vbwnq5f7feedwu-1432
  lisp/net/shr.el                shr.el-20101002102929-yfzewk55rsg0mn93-1
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2013-07-19 13:30:58 +0000
+++ b/lisp/ChangeLog    2013-07-19 14:07:43 +0000
@@ -1,3 +1,8 @@
+2013-07-19  Lars Magne Ingebrigtsen  <address@hidden>
+
+       * net/shr.el (shr-make-table-1): Ensure that we don't infloop on
+       degenerate widths.
+
 2013-07-19  Richard Stallman  <address@hidden>
 
        * epa.el (epa-popup-info-window): Doc fix.

=== modified file 'lisp/net/shr.el'
--- a/lisp/net/shr.el   2013-07-08 11:19:51 +0000
+++ b/lisp/net/shr.el   2013-07-19 14:07:43 +0000
@@ -1476,9 +1476,6 @@
                    (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 @@
                (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 @@
     (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)))


reply via email to

[Prev in Thread] Current Thread [Next in Thread]