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
55fc9022
Commit
55fc9022
authored
Apr 07, 2009
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gdi32: Fix SetEnhMetaFileBits last error handling.
parent
eceed527
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
4 deletions
+6
-4
enhmetafile.c
dlls/gdi32/enhmetafile.c
+6
-2
metafile.c
dlls/gdi32/tests/metafile.c
+0
-2
No files found.
dlls/gdi32/enhmetafile.c
View file @
55fc9022
...
@@ -252,12 +252,16 @@ HENHMETAFILE EMF_Create_HENHMETAFILE(ENHMETAHEADER *emh, BOOL on_disk )
...
@@ -252,12 +252,16 @@ HENHMETAFILE EMF_Create_HENHMETAFILE(ENHMETAHEADER *emh, BOOL on_disk )
HENHMETAFILE
hmf
;
HENHMETAFILE
hmf
;
ENHMETAFILEOBJ
*
metaObj
;
ENHMETAFILEOBJ
*
metaObj
;
if
(
emh
->
iType
!=
EMR_HEADER
||
emh
->
dSignature
!=
ENHMETA_SIGNATURE
||
if
(
emh
->
iType
!=
EMR_HEADER
)
{
SetLastError
(
ERROR_INVALID_DATA
);
return
0
;
}
if
(
emh
->
dSignature
!=
ENHMETA_SIGNATURE
||
(
emh
->
nBytes
&
3
))
/* refuse to load unaligned EMF as Windows does */
(
emh
->
nBytes
&
3
))
/* refuse to load unaligned EMF as Windows does */
{
{
WARN
(
"Invalid emf header type 0x%08x sig 0x%08x.
\n
"
,
WARN
(
"Invalid emf header type 0x%08x sig 0x%08x.
\n
"
,
emh
->
iType
,
emh
->
dSignature
);
emh
->
iType
,
emh
->
dSignature
);
SetLastError
(
ERROR_INVALID_DATA
);
return
0
;
return
0
;
}
}
...
...
dlls/gdi32/tests/metafile.c
View file @
55fc9022
...
@@ -2349,7 +2349,6 @@ static void test_SetEnhMetaFileBits(void)
...
@@ -2349,7 +2349,6 @@ static void test_SetEnhMetaFileBits(void)
ok
(
!
hemf
||
ok
(
!
hemf
||
broken
(
hemf
!=
NULL
),
/* Win9x, WinMe */
broken
(
hemf
!=
NULL
),
/* Win9x, WinMe */
"SetEnhMetaFileBits should fail
\n
"
);
"SetEnhMetaFileBits should fail
\n
"
);
todo_wine
ok
(
GetLastError
()
==
0xdeadbeef
,
"Expected deadbeef, got %u
\n
"
,
GetLastError
());
ok
(
GetLastError
()
==
0xdeadbeef
,
"Expected deadbeef, got %u
\n
"
,
GetLastError
());
DeleteEnhMetaFile
(
hemf
);
DeleteEnhMetaFile
(
hemf
);
...
@@ -2360,7 +2359,6 @@ static void test_SetEnhMetaFileBits(void)
...
@@ -2360,7 +2359,6 @@ static void test_SetEnhMetaFileBits(void)
ok
(
!
hemf
||
ok
(
!
hemf
||
broken
(
hemf
!=
NULL
),
/* Win9x, WinMe */
broken
(
hemf
!=
NULL
),
/* Win9x, WinMe */
"SetEnhMetaFileBits should fail
\n
"
);
"SetEnhMetaFileBits should fail
\n
"
);
todo_wine
ok
(
GetLastError
()
==
0xdeadbeef
,
"Expected deadbeef, got %u
\n
"
,
GetLastError
());
ok
(
GetLastError
()
==
0xdeadbeef
,
"Expected deadbeef, got %u
\n
"
,
GetLastError
());
DeleteEnhMetaFile
(
hemf
);
DeleteEnhMetaFile
(
hemf
);
}
}
...
...
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