mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-07-04 21:12:47 -05:00
Cast pointers to uintptr_t instead of unsigned {long,int}.
On 64bit Windows, pointers are 64bit whereas both unsigned long and unsigned int are 32bit. Using uintptr_t avoids truncation.
This commit is contained in:
@ -138,7 +138,7 @@ static int cmpfortree(void *av, void *bv)
|
||||
static int cmpforsearch(void *av, void *bv)
|
||||
{
|
||||
Actual_Socket b = (Actual_Socket) bv;
|
||||
unsigned long as = (unsigned long) av, bs = (unsigned long) b->s;
|
||||
uintptr_t as = (uintptr_t) av, bs = (uintptr_t) b->s;
|
||||
if (as < bs)
|
||||
return -1;
|
||||
if (as > bs)
|
||||
|
Reference in New Issue
Block a user