]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix off-by-1 typo in recent bignum changes
authorPaul Eggert <eggert@cs.ucla.edu>
Thu, 30 Aug 2018 21:28:19 +0000 (14:28 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Thu, 30 Aug 2018 21:28:39 +0000 (14:28 -0700)
Problem reported by Yuri D’Elia in:
https://lists.gnu.org/r/emacs-devel/2018-08/msg00977.html
and crucial clue provided by Michael Heerdegen in:
https://lists.gnu.org/r/emacs-devel/2018-08/msg01043.html
* src/font.c (font_unparse_xlfd): Fix off-by-1 typo.

src/font.c

index 4a63700f7905a3b4a7ecd768c9148968708ff5e3..e2414582f6762f4ad36e5db31005ad3ea4a03e49 100644 (file)
@@ -1290,7 +1290,7 @@ font_unparse_xlfd (Lisp_Object font, int pixel_size, char *name, int nbytes)
   if (INTEGERP (val))
     {
       intmax_t v = FIXNUMP (val) ? XFIXNUM (val) : bignum_to_intmax (val);
-      if (! (0 <= v && v <= TYPE_MAXIMUM (uprintmax_t)))
+      if (! (0 < v && v <= TYPE_MAXIMUM (uprintmax_t)))
        v = pixel_size;
       if (v > 0)
        {