From 5d8522565e8cbd6031a6c6cd4572187193d276b5 Mon Sep 17 00:00:00 2001 From: Lars Magne Ingebrigtsen Date: Sat, 25 Feb 2012 13:20:57 +0000 Subject: [PATCH] shr.el (shr-column-specs): Protect against TDs with "width: 0%". --- lisp/gnus/ChangeLog | 4 ++++ lisp/gnus/shr.el | 8 ++++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index e58b6cc7773..5b9ffc07d1c 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog @@ -1,3 +1,7 @@ +2012-02-25 Lars Magne Ingebrigtsen + + * shr.el (shr-column-specs): Protect against TDs with "width: 0%". + 2012-02-23 Katsumi Yamaoka * nntp.el (nntp-send-authinfo): Work for secure nntp entry in authinfo. diff --git a/lisp/gnus/shr.el b/lisp/gnus/shr.el index dd0f1599c36..41f12243971 100644 --- a/lisp/gnus/shr.el +++ b/lisp/gnus/shr.el @@ -1364,10 +1364,10 @@ ones, in case fg and bg are nil." (when (memq (car column) '(td th)) (let ((width (cdr (assq :width (cdr column))))) (when (and width - (string-match "\\([0-9]+\\)%" width)) - (aset columns i - (/ (string-to-number (match-string 1 width)) - 100.0)))) + (string-match "\\([0-9]+\\)%" width) + (not (zerop (setq width (string-to-number + (match-string 1 width)))))) + (aset columns i (/ width 100.0)))) (setq i (1+ i))))))) columns)) -- 2.39.2