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
a494cbb6
Commit
a494cbb6
authored
Nov 15, 2011
by
Eric Pouech
Committed by
Alexandre Julliard
Nov 16, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winhlp32: Fix hlpfile content decompression in phrase40 mode.
parent
f2919331
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
hlpfile.c
programs/winhlp32/hlpfile.c
+4
-3
No files found.
programs/winhlp32/hlpfile.c
View file @
a494cbb6
...
...
@@ -2358,14 +2358,14 @@ static BOOL HLPFILE_Uncompress_Phrases40(HLPFILE* hlpfile)
INT
dec_size
,
cpr_size
;
BYTE
*
buf_idx
,
*
end_idx
;
BYTE
*
buf_phs
,
*
end_phs
;
LONG
*
ptr
,
mask
=
0
;
U
LONG
*
ptr
,
mask
=
0
;
unsigned
int
i
;
unsigned
short
bc
,
n
;
if
(
!
HLPFILE_FindSubFile
(
hlpfile
,
"|PhrIndex"
,
&
buf_idx
,
&
end_idx
)
||
!
HLPFILE_FindSubFile
(
hlpfile
,
"|PhrImage"
,
&
buf_phs
,
&
end_phs
))
return
FALSE
;
ptr
=
(
LONG
*
)(
buf_idx
+
9
+
28
);
ptr
=
(
U
LONG
*
)(
buf_idx
+
9
+
28
);
bc
=
GET_USHORT
(
buf_idx
,
9
+
24
)
&
0x0F
;
num
=
hlpfile
->
num_phrases
=
GET_USHORT
(
buf_idx
,
9
+
4
);
...
...
@@ -2400,9 +2400,10 @@ static BOOL HLPFILE_Uncompress_Phrases40(HLPFILE* hlpfile)
return
FALSE
;
}
#define getbit() (
ptr += (mask < 0), mask = mask*2 + (mask<=0), (*ptr & mask
) != 0)
#define getbit() (
(mask <<= 1) ? (*ptr & mask) != 0: (*++ptr & (mask=1)
) != 0)
hlpfile
->
phrases_offsets
[
0
]
=
0
;
ptr
--
;
/* as we'll first increment ptr because mask is 0 on first getbit() call */
for
(
i
=
0
;
i
<
num
;
i
++
)
{
for
(
n
=
1
;
getbit
();
n
+=
1
<<
bc
);
...
...
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