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
ae147195
Commit
ae147195
authored
Jan 31, 2017
by
Lauri Kenttä
Committed by
Alexandre Julliard
Feb 01, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32: LZOpenFile should preserve cBytes on failure.
Signed-off-by:
Lauri Kenttä
<
lauri.kentta@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
41a82d80
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
8 deletions
+3
-8
lzexpand.c
dlls/kernel32/lzexpand.c
+3
-0
lzexpand_main.c
dlls/lz32/tests/lzexpand_main.c
+0
-8
No files found.
dlls/kernel32/lzexpand.c
View file @
ae147195
...
...
@@ -534,6 +534,7 @@ static LPSTR LZEXPAND_MangleName( LPCSTR fn )
HFILE
WINAPI
LZOpenFileA
(
LPSTR
fn
,
LPOFSTRUCT
ofs
,
WORD
mode
)
{
HFILE
fd
,
cfd
;
BYTE
ofs_cBytes
=
ofs
->
cBytes
;
TRACE
(
"(%s,%p,%d)
\n
"
,
fn
,
ofs
,
mode
);
/* 0x70 represents all OF_SHARE_* flags, ignore them for the check */
...
...
@@ -544,6 +545,8 @@ HFILE WINAPI LZOpenFileA( LPSTR fn, LPOFSTRUCT ofs, WORD mode )
fd
=
OpenFile
(
mfn
,
ofs
,
mode
);
HeapFree
(
GetProcessHeap
(),
0
,
mfn
);
}
if
(
fd
==
HFILE_ERROR
)
ofs
->
cBytes
=
ofs_cBytes
;
if
((
mode
&~
0x70
)
!=
OF_READ
)
return
fd
;
if
(
fd
==
HFILE_ERROR
)
...
...
dlls/lz32/tests/lzexpand_main.c
View file @
ae147195
...
...
@@ -229,7 +229,6 @@ static void test_LZOpenFileA_nonexisting_compressed(void)
"LZOpenFileA succeeded on nonexistent file
\n
"
);
ok
(
GetLastError
()
==
ERROR_FILE_NOT_FOUND
,
"GetLastError() returns %d
\n
"
,
GetLastError
());
todo_wine
ok
(
test
.
cBytes
==
0xA5
,
"LZOpenFileA set test.cBytes to %d
\n
"
,
test
.
cBytes
);
ok
(
test
.
nErrCode
==
ERROR_FILE_NOT_FOUND
,
...
...
@@ -249,7 +248,6 @@ static void test_LZOpenFileA_nonexisting_compressed(void)
"LZOpenFileA succeeded on nonexistent file
\n
"
);
ok
(
GetLastError
()
==
ERROR_FILE_NOT_FOUND
,
"GetLastError() returns %d
\n
"
,
GetLastError
());
todo_wine
ok
(
test
.
cBytes
==
0xA5
,
"LZOpenFileA set test.cBytes to %d
\n
"
,
test
.
cBytes
);
ok
(
test
.
nErrCode
==
ERROR_FILE_NOT_FOUND
,
...
...
@@ -269,7 +267,6 @@ static void test_LZOpenFileA_nonexisting_compressed(void)
"LZOpenFileA succeeded on nonexistent file
\n
"
);
ok
(
GetLastError
()
==
ERROR_FILE_NOT_FOUND
,
"GetLastError() returns %d
\n
"
,
GetLastError
());
todo_wine
ok
(
test
.
cBytes
==
0xA5
,
"LZOpenFileA set test.cBytes to %d
\n
"
,
test
.
cBytes
);
ok
(
test
.
nErrCode
==
ERROR_FILE_NOT_FOUND
,
...
...
@@ -289,7 +286,6 @@ static void test_LZOpenFileA_nonexisting_compressed(void)
"LZOpenFileA succeeded on nonexistent file
\n
"
);
ok
(
GetLastError
()
==
ERROR_FILE_NOT_FOUND
,
"GetLastError() returns %d
\n
"
,
GetLastError
());
todo_wine
ok
(
test
.
cBytes
==
0xA5
,
"LZOpenFileA set test.cBytes to %d
\n
"
,
test
.
cBytes
);
ok
(
test
.
nErrCode
==
ERROR_FILE_NOT_FOUND
,
...
...
@@ -633,7 +629,6 @@ static void test_LZOpenFileW_nonexisting_compressed(void)
"LZOpenFileW succeeded on nonexistent file
\n
"
);
ok
(
GetLastError
()
==
ERROR_FILE_NOT_FOUND
,
"GetLastError() returns %d
\n
"
,
GetLastError
());
todo_wine
ok
(
test
.
cBytes
==
0xA5
,
"LZOpenFileW set test.cBytes to %d
\n
"
,
test
.
cBytes
);
ok
(
test
.
nErrCode
==
ERROR_FILE_NOT_FOUND
,
...
...
@@ -653,7 +648,6 @@ static void test_LZOpenFileW_nonexisting_compressed(void)
"LZOpenFileW succeeded on nonexistent file
\n
"
);
ok
(
GetLastError
()
==
ERROR_FILE_NOT_FOUND
,
"GetLastError() returns %d
\n
"
,
GetLastError
());
todo_wine
ok
(
test
.
cBytes
==
0xA5
,
"LZOpenFileW set test.cBytes to %d
\n
"
,
test
.
cBytes
);
ok
(
test
.
nErrCode
==
ERROR_FILE_NOT_FOUND
,
...
...
@@ -673,7 +667,6 @@ static void test_LZOpenFileW_nonexisting_compressed(void)
"LZOpenFileW succeeded on nonexistent file
\n
"
);
ok
(
GetLastError
()
==
ERROR_FILE_NOT_FOUND
,
"GetLastError() returns %d
\n
"
,
GetLastError
());
todo_wine
ok
(
test
.
cBytes
==
0xA5
,
"LZOpenFileW set test.cBytes to %d
\n
"
,
test
.
cBytes
);
ok
(
test
.
nErrCode
==
ERROR_FILE_NOT_FOUND
,
...
...
@@ -693,7 +686,6 @@ static void test_LZOpenFileW_nonexisting_compressed(void)
"LZOpenFileW succeeded on nonexistent file
\n
"
);
ok
(
GetLastError
()
==
ERROR_FILE_NOT_FOUND
,
"GetLastError() returns %d
\n
"
,
GetLastError
());
todo_wine
ok
(
test
.
cBytes
==
0xA5
,
"LZOpenFileW set test.cBytes to %d
\n
"
,
test
.
cBytes
);
ok
(
test
.
nErrCode
==
ERROR_FILE_NOT_FOUND
,
...
...
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