Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
4bdcf512
Commit
4bdcf512
authored
Sep 14, 2016
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32: Fix GetClipboardFormatName behavior for integer formats.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
30179166
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
8 deletions
+8
-8
clipboard.c
dlls/user32/clipboard.c
+6
-6
clipboard.c
dlls/user32/tests/clipboard.c
+2
-2
No files found.
dlls/user32/clipboard.c
View file @
4bdcf512
...
...
@@ -456,20 +456,20 @@ UINT WINAPI RegisterClipboardFormatA( LPCSTR name )
/**************************************************************************
* GetClipboardFormatNameW (USER32.@)
*/
INT
WINAPI
GetClipboardFormatNameW
(
UINT
wFormat
,
LPWSTR
retStr
,
INT
maxlen
)
INT
WINAPI
GetClipboardFormatNameW
(
UINT
format
,
LPWSTR
buffer
,
INT
maxlen
)
{
if
(
wFormat
<
MAXINTATOM
)
return
0
;
return
GlobalGetAtomNameW
(
wFormat
,
retSt
r
,
maxlen
);
if
(
format
<
MAXINTATOM
||
format
>
0xffff
)
return
0
;
return
GlobalGetAtomNameW
(
format
,
buffe
r
,
maxlen
);
}
/**************************************************************************
* GetClipboardFormatNameA (USER32.@)
*/
INT
WINAPI
GetClipboardFormatNameA
(
UINT
wFormat
,
LPSTR
retStr
,
INT
maxlen
)
INT
WINAPI
GetClipboardFormatNameA
(
UINT
format
,
LPSTR
buffer
,
INT
maxlen
)
{
if
(
wFormat
<
MAXINTATOM
)
return
0
;
return
GlobalGetAtomNameA
(
wFormat
,
retSt
r
,
maxlen
);
if
(
format
<
MAXINTATOM
||
format
>
0xffff
)
return
0
;
return
GlobalGetAtomNameA
(
format
,
buffe
r
,
maxlen
);
}
...
...
dlls/user32/tests/clipboard.c
View file @
4bdcf512
...
...
@@ -416,12 +416,12 @@ todo_wine
ok
(
GetLastError
()
==
ERROR_FILE_NOT_FOUND
,
"err %d
\n
"
,
GetLastError
());
}
for
(
format_id
=
0
;
format_id
<
0x
f
fff
;
format_id
++
)
for
(
format_id
=
0
;
format_id
<
0x
10
fff
;
format_id
++
)
{
SetLastError
(
0xdeadbeef
);
len
=
GetClipboardFormatNameA
(
format_id
,
buf
,
256
);
if
(
format_id
<
0xc000
)
if
(
format_id
<
0xc000
||
format_id
>
0xffff
)
ok
(
!
len
,
"GetClipboardFormatNameA should fail, but it returned %d (%s)
\n
"
,
len
,
buf
);
else
if
(
len
&&
winetest_debug
>
1
)
trace
(
"%04x: %s
\n
"
,
format_id
,
len
?
buf
:
""
);
...
...
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