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
423813e3
Commit
423813e3
authored
Jul 04, 1999
by
Marcus Meissner
Committed by
Alexandre Julliard
Jul 04, 1999
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
When enumerating resource, only use the lower 31 bit of the name as
the offset (for the highest bit is '1'). Should fix wine-net/257.
parent
a4b80d44
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
12 deletions
+12
-12
pe_resource.c
loader/pe_resource.c
+12
-12
No files found.
loader/pe_resource.c
View file @
423813e3
...
@@ -185,10 +185,10 @@ PE_EnumResourceTypesA(HMODULE hmod,ENUMRESTYPEPROCA lpfun,LONG lparam) {
...
@@ -185,10 +185,10 @@ PE_EnumResourceTypesA(HMODULE hmod,ENUMRESTYPEPROCA lpfun,LONG lparam) {
for
(
i
=
0
;
i
<
resdir
->
NumberOfNamedEntries
+
resdir
->
NumberOfIdEntries
;
i
++
)
{
for
(
i
=
0
;
i
<
resdir
->
NumberOfNamedEntries
+
resdir
->
NumberOfIdEntries
;
i
++
)
{
LPSTR
name
;
LPSTR
name
;
if
(
HIWORD
(
et
[
i
].
u1
.
Name
)
)
if
(
et
[
i
].
u1
.
s
.
NameIsString
)
name
=
HEAP_strdupWtoA
(
heap
,
0
,(
LPWSTR
)((
LPBYTE
)
pem
->
pe_resource
+
et
[
i
].
u1
.
Name
));
name
=
HEAP_strdupWtoA
(
heap
,
0
,(
LPWSTR
)((
LPBYTE
)
pem
->
pe_resource
+
et
[
i
].
u1
.
s
.
NameOffset
));
else
else
name
=
(
LPSTR
)
et
[
i
].
u1
.
Name
;
name
=
(
LPSTR
)
(
int
)
et
[
i
].
u1
.
Id
;
ret
=
lpfun
(
hmod
,
name
,
lparam
);
ret
=
lpfun
(
hmod
,
name
,
lparam
);
if
(
HIWORD
(
name
))
if
(
HIWORD
(
name
))
HeapFree
(
heap
,
0
,
name
);
HeapFree
(
heap
,
0
,
name
);
...
@@ -217,10 +217,10 @@ PE_EnumResourceTypesW(HMODULE hmod,ENUMRESTYPEPROCW lpfun,LONG lparam) {
...
@@ -217,10 +217,10 @@ PE_EnumResourceTypesW(HMODULE hmod,ENUMRESTYPEPROCW lpfun,LONG lparam) {
ret
=
FALSE
;
ret
=
FALSE
;
for
(
i
=
0
;
i
<
resdir
->
NumberOfNamedEntries
+
resdir
->
NumberOfIdEntries
;
i
++
)
{
for
(
i
=
0
;
i
<
resdir
->
NumberOfNamedEntries
+
resdir
->
NumberOfIdEntries
;
i
++
)
{
LPWSTR
type
;
LPWSTR
type
;
if
(
HIWORD
(
et
[
i
].
u1
.
Name
)
)
if
(
et
[
i
].
u1
.
s
.
NameIsString
)
type
=
(
LPWSTR
)((
LPBYTE
)
pem
->
pe_resource
+
et
[
i
].
u1
.
Name
);
type
=
(
LPWSTR
)((
LPBYTE
)
pem
->
pe_resource
+
et
[
i
].
u1
.
s
.
NameOffset
);
else
else
type
=
(
LPWSTR
)
et
[
i
].
u1
.
Name
;
type
=
(
LPWSTR
)
(
int
)
et
[
i
].
u1
.
Id
;
ret
=
lpfun
(
hmod
,
type
,
lparam
);
ret
=
lpfun
(
hmod
,
type
,
lparam
);
if
(
!
ret
)
if
(
!
ret
)
...
@@ -261,10 +261,10 @@ PE_EnumResourceNamesA(
...
@@ -261,10 +261,10 @@ PE_EnumResourceNamesA(
for
(
i
=
0
;
i
<
resdir
->
NumberOfNamedEntries
+
resdir
->
NumberOfIdEntries
;
i
++
)
{
for
(
i
=
0
;
i
<
resdir
->
NumberOfNamedEntries
+
resdir
->
NumberOfIdEntries
;
i
++
)
{
LPSTR
name
;
LPSTR
name
;
if
(
HIWORD
(
et
[
i
].
u1
.
Name
)
)
if
(
et
[
i
].
u1
.
s
.
NameIsString
)
name
=
HEAP_strdupWtoA
(
heap
,
0
,(
LPWSTR
)((
LPBYTE
)
pem
->
pe_resource
+
et
[
i
].
u1
.
Name
));
name
=
HEAP_strdupWtoA
(
heap
,
0
,(
LPWSTR
)((
LPBYTE
)
pem
->
pe_resource
+
et
[
i
].
u1
.
s
.
NameOffset
));
else
else
name
=
(
LPSTR
)
et
[
i
].
u1
.
Name
;
name
=
(
LPSTR
)
(
int
)
et
[
i
].
u1
.
Id
;
ret
=
lpfun
(
hmod
,
type
,
name
,
lparam
);
ret
=
lpfun
(
hmod
,
type
,
name
,
lparam
);
if
(
HIWORD
(
name
))
HeapFree
(
heap
,
0
,
name
);
if
(
HIWORD
(
name
))
HeapFree
(
heap
,
0
,
name
);
if
(
!
ret
)
if
(
!
ret
)
...
@@ -297,10 +297,10 @@ PE_EnumResourceNamesW(
...
@@ -297,10 +297,10 @@ PE_EnumResourceNamesW(
ret
=
FALSE
;
ret
=
FALSE
;
for
(
i
=
0
;
i
<
resdir
->
NumberOfNamedEntries
+
resdir
->
NumberOfIdEntries
;
i
++
)
{
for
(
i
=
0
;
i
<
resdir
->
NumberOfNamedEntries
+
resdir
->
NumberOfIdEntries
;
i
++
)
{
LPWSTR
name
;
LPWSTR
name
;
if
(
HIWORD
(
et
[
i
].
u1
.
Name
)
)
if
(
et
[
i
].
u1
.
s
.
NameIsString
)
name
=
(
LPWSTR
)((
LPBYTE
)
pem
->
pe_resource
+
et
[
i
].
u1
.
Name
);
name
=
(
LPWSTR
)((
LPBYTE
)
pem
->
pe_resource
+
et
[
i
].
u1
.
s
.
NameOffset
);
else
else
name
=
(
LPWSTR
)
et
[
i
].
u1
.
Name
;
name
=
(
LPWSTR
)
(
int
)
et
[
i
].
u1
.
Id
;
ret
=
lpfun
(
hmod
,
type
,
name
,
lparam
);
ret
=
lpfun
(
hmod
,
type
,
name
,
lparam
);
if
(
!
ret
)
if
(
!
ret
)
break
;
break
;
...
...
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