* nnheader.el (nnheader-find-nov-line): Changed midpoint
authorKevin Greiner <kevin.greiner@compsol.cc>
Mon, 24 Feb 2003 17:28:56 +0000 (17:28 +0000)
committerKevin Greiner <kevin.greiner@compsol.cc>
Mon, 24 Feb 2003 17:28:56 +0000 (17:28 +0000)
calculation to avoid integer overflow.

lisp/ChangeLog
lisp/nnheader.el

index 7c0699b..1e21c2d 100644 (file)
@@ -1,3 +1,8 @@
+2002-02-24  Kevin Greiner  <kgreiner@xpediantsolutions.com>
+
+       * nnheader.el (nnheader-find-nov-line): Changed midpoint
+       calculation to avoid integer overflow.
+
 2003-02-24  Reiner Steib  <Reiner.Steib@gmx.de>
 
        * gnus-start.el (gnus-backup-startup-file): Fixed custom type.
index 96dc094..e3cbb4a 100644 (file)
@@ -489,7 +489,7 @@ the line could be found."
        (prev (point-min))
        num found)
     (while (not found)
-      (goto-char (/ (+ max min) 2))
+      (goto-char (+ min (/ (- max min) 2)))
       (beginning-of-line)
       (if (or (= (point) prev)
              (eobp))