summaryrefslogtreecommitdiff
path: root/src/dbusbind.c
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2017-03-04 23:14:52 -0800
committerPaul Eggert <eggert@cs.ucla.edu>2017-03-04 23:18:39 -0800
commit0d55c44a9a00da3b8542e92586654adeb2bcf228 (patch)
tree1105e60b43ef80d105ca613ece1c8cfc6ee64f07 /src/dbusbind.c
parent44e7ee2e356452139156e8175c46f646835d27ff (diff)
downloademacs-0d55c44a9a00da3b8542e92586654adeb2bcf228.tar.gz
Compare and round more carefully
* etc/NEWS: Document this. * src/data.c (store_symval_forwarding): * src/sound.c (parse_sound): Do not botch NaN comparison. * src/data.c (cons_to_unsigned, cons_to_signed): Signal an error if a floating-point arg is not integral. * src/data.c (cons_to_unsigned, cons_to_signed): * src/fileio.c (file_offset): Use simpler overflow check. * src/dbusbind.c (xd_extract_signed, xd_extract_unsigned): Avoid rounding error in overflow check. (Fcar_less_than_car): Use arithcompare directly. * test/src/charset-tests.el: New file.
Diffstat (limited to 'src/dbusbind.c')
-rw-r--r--src/dbusbind.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/dbusbind.c b/src/dbusbind.c
index e7c3251c14b..d2460fd886e 100644
--- a/src/dbusbind.c
+++ b/src/dbusbind.c
@@ -526,7 +526,7 @@ xd_extract_signed (Lisp_Object x, intmax_t lo, intmax_t hi)
else
{
double d = XFLOAT_DATA (x);
- if (lo <= d && d <= hi)
+ if (lo <= d && d < 1.0 + hi)
{
intmax_t n = d;
if (n == d)
@@ -554,7 +554,7 @@ xd_extract_unsigned (Lisp_Object x, uintmax_t hi)
else
{
double d = XFLOAT_DATA (x);
- if (0 <= d && d <= hi)
+ if (0 <= d && d < 1.0 + hi)
{
uintmax_t n = d;
if (n == d)