From: Paul Eggert Date: Thu, 30 Aug 2018 21:28:19 +0000 (-0700) Subject: Fix off-by-1 typo in recent bignum changes X-Git-Tag: emacs-27.0.90~4484 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=6d6f45e21830a57b4a12af0f89913752a137a653;p=emacs.git Fix off-by-1 typo in recent bignum changes 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. --- diff --git a/src/font.c b/src/font.c index 4a63700f790..e2414582f67 100644 --- a/src/font.c +++ b/src/font.c @@ -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) {