summaryrefslogtreecommitdiff
path: root/src/data.c
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2018-12-30 19:00:09 -0800
committerPaul Eggert <eggert@cs.ucla.edu>2018-12-30 19:00:46 -0800
commitbed56428a6e767d68a974f5ad81bebf035eb44f4 (patch)
treef6ad2c06068aedb94391920993fe96220124f82f /src/data.c
parent433b6a74ec73608ff06106daee4f53c5175d5297 (diff)
downloademacs-bed56428a6e767d68a974f5ad81bebf035eb44f4.tar.gz
emacs-bed56428a6e767d68a974f5ad81bebf035eb44f4.tar.bz2
emacs-bed56428a6e767d68a974f5ad81bebf035eb44f4.zip
Fix assertion-violations on non-integers
These bugs were introduced after bignums were added. * src/data.c (cons_to_unsigned, cons_to_signed): * src/xdisp.c (calc_line_height_property): Invoke integer_to_intmax and integer_to_uintmax only on integers.
Diffstat (limited to 'src/data.c')
-rw-r--r--src/data.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/data.c b/src/data.c
index c64adb6635e..4ea71cea5d2 100644
--- a/src/data.c
+++ b/src/data.c
@@ -2655,7 +2655,7 @@ cons_to_unsigned (Lisp_Object c, uintmax_t max)
else
{
Lisp_Object hi = CONSP (c) ? XCAR (c) : c;
- valid = integer_to_uintmax (hi, &val);
+ valid = INTEGERP (hi) && integer_to_uintmax (hi, &val);
if (valid && CONSP (c))
{
@@ -2716,7 +2716,7 @@ cons_to_signed (Lisp_Object c, intmax_t min, intmax_t max)
else
{
Lisp_Object hi = CONSP (c) ? XCAR (c) : c;
- valid = integer_to_intmax (hi, &val);
+ valid = INTEGERP (hi) && integer_to_intmax (hi, &val);
if (valid && CONSP (c))
{