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
c4a26442
Commit
c4a26442
authored
Sep 10, 2000
by
Andreas Mohr
Committed by
Alexandre Julliard
Sep 10, 2000
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed NE_LoadExeHeader error handling.
parent
208955ca
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
6 deletions
+16
-6
module.c
loader/ne/module.c
+16
-6
No files found.
loader/ne/module.c
View file @
c4a26442
...
...
@@ -396,6 +396,9 @@ HANDLE NE_OpenFile( NE_MODULE *pModule )
/***********************************************************************
* NE_LoadExeHeader
*
* We always have to close hFile upon exit.
* Otherwise we get file sharing trouble !
*/
static
HMODULE16
NE_LoadExeHeader
(
LPCSTR
filename
)
{
...
...
@@ -439,13 +442,20 @@ static HMODULE16 NE_LoadExeHeader( LPCSTR filename )
return
(
HMODULE16
)
11
;
/* invalid exe */
}
if
(
ne_header
.
ne_magic
==
IMAGE_NT_SIGNATURE
)
return
(
HMODULE16
)
21
;
/* win32 exe */
if
(
ne_header
.
ne_magic
!=
IMAGE_OS2_SIGNATURE
)
return
(
HMODULE16
)
11
;
/* invalid exe */
if
(
ne_header
.
ne_magic
==
IMAGE_NT_SIGNATURE
)
{
_lclose16
(
hFile
);
return
(
HMODULE16
)
21
;
/* win32 exe */
}
if
(
ne_header
.
ne_magic
==
IMAGE_OS2_SIGNATURE_LX
)
{
MESSAGE
(
"Sorry, this is an OS/2 linear executable (LX) file !
\n
"
);
_lclose16
(
hFile
);
return
(
HMODULE16
)
12
;
MESSAGE
(
"Sorry, this is an OS/2 linear executable (LX) file !
\n
"
);
_lclose16
(
hFile
);
return
(
HMODULE16
)
12
;
}
if
(
ne_header
.
ne_magic
!=
IMAGE_OS2_SIGNATURE
)
{
_lclose16
(
hFile
);
return
(
HMODULE16
)
11
;
/* invalid exe */
}
/* We now have a valid NE header */
...
...
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