]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix too-large integer in Hg backend
authorPaul Eggert <eggert@cs.ucla.edu>
Fri, 23 Mar 2018 20:10:14 +0000 (13:10 -0700)
committerAndrew G Cohen <cohen@andy.bu.edu>
Tue, 11 Dec 2018 06:17:58 +0000 (14:17 +0800)
* lisp/vc/vc-hg.el (vc-hg-state-fast):
Don’t assume that 2**32 - 1 is representable as a fixnum.

lisp/vc/vc-hg.el

index 9dafaef7aaf4b93766cd547bd2c31e6e56f6b9d6..14df9d8b673e8ce014485111be3069a7ac01d989 100644 (file)
@@ -1016,8 +1016,8 @@ hg binary."
          (not (vc-hg--requirements-understood-p repo))
          ;; Dirstate too small to be valid
          (< (nth 7 dirstate-attr) 40)
-         ;; We want to store 32-bit unsigned values in fixnums
-         (< most-positive-fixnum 4294967295)
+         ;; We want to store 32-bit unsigned values in fixnums.
+         (zerop (lsh -1 32))
          (progn
            (setf repo-relative-filename
                  (file-relative-name truename repo))