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
27681bdf
Commit
27681bdf
authored
Aug 11, 2006
by
Kirill K. Smirnov
Committed by
Alexandre Julliard
Aug 11, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winhelp: Fix LZ77 decompressor.
parent
4aaf1f0b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
2 deletions
+10
-2
hlpfile.c
programs/winhelp/hlpfile.c
+10
-2
No files found.
programs/winhelp/hlpfile.c
View file @
27681bdf
...
...
@@ -1498,8 +1498,16 @@ static BYTE *HLPFILE_UncompressLZ77(BYTE *ptr, BYTE *end, BYTE *newptr)
int
code
=
GET_USHORT
(
ptr
,
0
);
int
len
=
3
+
(
code
>>
12
);
int
offset
=
code
&
0xfff
;
memcpy
(
newptr
,
newptr
-
offset
-
1
,
len
);
newptr
+=
len
;
/*
* We must copy byte-by-byte here. We cannot use memcpy nor
* memmove here. Just example:
* a[]={1,2,3,4,5,6,7,8,9,10}
* newptr=a+2;
* offset=1;
* We expect:
* {1, 2, 1, 2, 1, 2, 1, 2, 1, 2, 11, 12}
*/
for
(;
len
>
0
;
len
--
,
newptr
++
)
*
newptr
=
*
(
newptr
-
offset
-
1
);
ptr
+=
2
;
}
else
*
newptr
++
=
*
ptr
++
;
...
...
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