Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
90af05f0
Commit
90af05f0
authored
May 07, 2005
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Treat 0xffff the same as 0 for the handle generation field to avoid
sign extension problems.
parent
c0cb4d35
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
5 deletions
+8
-5
win.c
dlls/user/win.c
+3
-2
user.c
server/user.c
+5
-3
No files found.
dlls/user/win.c
View file @
90af05f0
...
...
@@ -307,13 +307,14 @@ WND *WIN_GetPtr( HWND hwnd )
USER_Lock
();
if
((
ptr
=
user_handles
[
index
]))
{
if
(
ptr
->
dwMagic
==
WND_MAGIC
&&
(
!
HIWORD
(
hwnd
)
||
hwnd
==
ptr
->
hwndSelf
))
if
(
ptr
->
dwMagic
==
WND_MAGIC
&&
(
hwnd
==
ptr
->
hwndSelf
||
!
HIWORD
(
hwnd
)
||
HIWORD
(
hwnd
)
==
0xffff
))
return
ptr
;
ptr
=
NULL
;
}
else
if
(
index
==
USER_HANDLE_TO_INDEX
(
hwndDesktop
))
{
if
(
!
HIWORD
(
hwnd
)
||
hwnd
==
GetDesktopWindow
()
)
ptr
=
WND_DESKTOP
;
if
(
hwnd
==
GetDesktopWindow
()
||
!
HIWORD
(
hwnd
)
||
HIWORD
(
hwnd
)
==
0xffff
)
ptr
=
WND_DESKTOP
;
else
ptr
=
NULL
;
}
else
ptr
=
WND_OTHER_PROCESS
;
...
...
server/user.c
View file @
90af05f0
...
...
@@ -35,12 +35,14 @@ static int allocated_handles;
static
struct
user_handle
*
handle_to_entry
(
user_handle_t
handle
)
{
unsigned
short
generation
;
int
index
=
(((
unsigned
int
)
handle
&
0xffff
)
-
FIRST_USER_HANDLE
)
>>
1
;
if
(
index
<
0
||
index
>=
nb_handles
)
return
NULL
;
if
(
!
handles
[
index
].
type
)
return
NULL
;
if
(((
unsigned
int
)
handle
>>
16
)
&&
((
unsigned
int
)
handle
>>
16
!=
handles
[
index
].
generation
))
return
NULL
;
return
&
handles
[
index
];
generation
=
(
unsigned
int
)
handle
>>
16
;
if
(
generation
==
handles
[
index
].
generation
||
!
generation
||
generation
==
0xffff
)
return
&
handles
[
index
];
return
NULL
;
}
inline
static
user_handle_t
entry_to_handle
(
struct
user_handle
*
ptr
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment