(rfc2047-encode-region): Don't infloop. Suggested by Hiroshi Fujishima.
authorKatsumi Yamaoka <yamaoka@jpl.org>
Sun, 25 Jul 2004 00:58:27 +0000 (00:58 +0000)
committerKatsumi Yamaoka <yamaoka@jpl.org>
Sun, 25 Jul 2004 00:58:27 +0000 (00:58 +0000)
lisp/ChangeLog
lisp/rfc2047.el

index 696daf1..e60b7bd 100644 (file)
@@ -1,3 +1,8 @@
+2004-07-25  Katsumi Yamaoka  <yamaoka@jpl.org>
+
+       * rfc2047.el (rfc2047-encode-region): Don't infloop.  Suggested by
+       Hiroshi Fujishima <pooh@nature.tsukuba.ac.jp>.
+
 2004-07-25  Lars Magne Ingebrigtsen  <larsi@gnus.org>
 
        * flow-fill.el (fill-flowed): Remove space stuffing, and only do
index b5ede87..eac4815 100644 (file)
@@ -376,7 +376,7 @@ Dynamically bind `rfc2047-encoding-type' to change that."
                  ;; Skip one ASCII word, or encode continuous words
                  ;; in which all those contain non-ASCII characters.
                  (setq end nil)
-                 (while (not end)
+                 (while (not (or end (eobp)))
                    (when (looking-at "[\000-\177]+")
                      (setq begin (point)
                            end (match-end 0))