bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#9498: "Not an in-range integer,..." when using Synergy


From: Paul Eggert
Subject: bug#9498: "Not an in-range integer,..." when using Synergy
Date: Fri, 16 Sep 2011 11:05:51 -0700
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.21) Gecko/20110831 Thunderbird/3.1.13

On 09/15/11 18:31, Chong Yidong wrote:
> The patch below probably fixes the error for this specific bug, but I
> will leave it up to Paul to figure out if it's the right fix.

That's on the right track, but it assumes the value in question
is less than LONG_MAX, which is true on a 64-bit host but not
on a 32-bit host.  I came up with a revised patch to address that.
I also reviewed my earlier change and found an inverted test, which I
also fixed, as part of bzr 105796 on the trunk.  This patch
also adds a comment along the line that Eli suggested.

I'm still a bit concerned by the difference between what was
in Emacs 23.3 (it sometimes deals with unsigned quantities
in X selections, and sometimes signed) and what we have now
(usually signed quantities, at Jan D.'s suggestion, but unsigned in
the case above, now).  The Emacs 23.3 code is obviously wrong
in some cases: for example:

  else if (INTEGERP (obj)
           && XINT (obj) < 0xFFFF
           && XINT (obj) > -0xFFFF)
 
as a test whether OBJ fits into 16 bits is clearly wrong, as
the range -65534 .. 65534 doesn't make any sense.  The current
code is better, but could well have remaining gotchas.  A review
by Jan D. would help, I think.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]