Storing an IP address in a signed int results in bugs if it starts
with >=128.
This commit is contained in:
parent
c59655ede0
commit
d9c1fc339a
@ -347,7 +347,8 @@ IPADDRESS_SetAddress (HWND hwnd, WPARAM wParam, LPARAM lParam)
|
|||||||
HDC hdc;
|
HDC hdc;
|
||||||
LPIP_SUBCLASS_INFO lpipsi=(LPIP_SUBCLASS_INFO)
|
LPIP_SUBCLASS_INFO lpipsi=(LPIP_SUBCLASS_INFO)
|
||||||
GetPropA ((HWND)hwnd, IP_SUBCLASS_PROP);
|
GetPropA ((HWND)hwnd, IP_SUBCLASS_PROP);
|
||||||
int i,ip_address,value;
|
int i,value;
|
||||||
|
DWORD ip_address;
|
||||||
char buf[20];
|
char buf[20];
|
||||||
|
|
||||||
TRACE("\n");
|
TRACE("\n");
|
||||||
@ -361,7 +362,7 @@ IPADDRESS_SetAddress (HWND hwnd, WPARAM wParam, LPARAM lParam)
|
|||||||
SetWindowTextA (lpipsi->hwndIP[i],buf);
|
SetWindowTextA (lpipsi->hwndIP[i],buf);
|
||||||
IPADDRESS_SendNotify (hwnd, EN_CHANGE);
|
IPADDRESS_SendNotify (hwnd, EN_CHANGE);
|
||||||
}
|
}
|
||||||
ip_address/=256;
|
ip_address= ip_address >> 8;
|
||||||
}
|
}
|
||||||
|
|
||||||
hdc = GetDC (hwnd); /* & send notifications */
|
hdc = GetDC (hwnd); /* & send notifications */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user