mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-05 16:40:26 +00:00
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.
This commit is contained in:
parent
a4b80d4495
commit
423813e30c
|
@ -185,10 +185,10 @@ PE_EnumResourceTypesA(HMODULE hmod,ENUMRESTYPEPROCA lpfun,LONG lparam) {
|
|||
for (i=0;i<resdir->NumberOfNamedEntries+resdir->NumberOfIdEntries;i++) {
|
||||
LPSTR name;
|
||||
|
||||
if (HIWORD(et[i].u1.Name))
|
||||
name = HEAP_strdupWtoA(heap,0,(LPWSTR)((LPBYTE)pem->pe_resource+et[i].u1.Name));
|
||||
if (et[i].u1.s.NameIsString)
|
||||
name = HEAP_strdupWtoA(heap,0,(LPWSTR)((LPBYTE)pem->pe_resource+et[i].u1.s.NameOffset));
|
||||
else
|
||||
name = (LPSTR)et[i].u1.Name;
|
||||
name = (LPSTR)(int)et[i].u1.Id;
|
||||
ret = lpfun(hmod,name,lparam);
|
||||
if (HIWORD(name))
|
||||
HeapFree(heap,0,name);
|
||||
|
@ -217,10 +217,10 @@ PE_EnumResourceTypesW(HMODULE hmod,ENUMRESTYPEPROCW lpfun,LONG lparam) {
|
|||
ret = FALSE;
|
||||
for (i=0;i<resdir->NumberOfNamedEntries+resdir->NumberOfIdEntries;i++) {
|
||||
LPWSTR type;
|
||||
if (HIWORD(et[i].u1.Name))
|
||||
type = (LPWSTR)((LPBYTE)pem->pe_resource+et[i].u1.Name);
|
||||
if (et[i].u1.s.NameIsString)
|
||||
type = (LPWSTR)((LPBYTE)pem->pe_resource+et[i].u1.s.NameOffset);
|
||||
else
|
||||
type = (LPWSTR)et[i].u1.Name;
|
||||
type = (LPWSTR)(int)et[i].u1.Id;
|
||||
|
||||
ret = lpfun(hmod,type,lparam);
|
||||
if (!ret)
|
||||
|
@ -261,10 +261,10 @@ PE_EnumResourceNamesA(
|
|||
for (i=0;i<resdir->NumberOfNamedEntries+resdir->NumberOfIdEntries;i++) {
|
||||
LPSTR name;
|
||||
|
||||
if (HIWORD(et[i].u1.Name))
|
||||
name = HEAP_strdupWtoA(heap,0,(LPWSTR)((LPBYTE)pem->pe_resource+et[i].u1.Name));
|
||||
if (et[i].u1.s.NameIsString)
|
||||
name = HEAP_strdupWtoA(heap,0,(LPWSTR)((LPBYTE)pem->pe_resource+et[i].u1.s.NameOffset));
|
||||
else
|
||||
name = (LPSTR)et[i].u1.Name;
|
||||
name = (LPSTR)(int)et[i].u1.Id;
|
||||
ret = lpfun(hmod,type,name,lparam);
|
||||
if (HIWORD(name)) HeapFree(heap,0,name);
|
||||
if (!ret)
|
||||
|
@ -297,10 +297,10 @@ PE_EnumResourceNamesW(
|
|||
ret = FALSE;
|
||||
for (i=0;i<resdir->NumberOfNamedEntries+resdir->NumberOfIdEntries;i++) {
|
||||
LPWSTR name;
|
||||
if (HIWORD(et[i].u1.Name))
|
||||
name = (LPWSTR)((LPBYTE)pem->pe_resource+et[i].u1.Name);
|
||||
if (et[i].u1.s.NameIsString)
|
||||
name = (LPWSTR)((LPBYTE)pem->pe_resource+et[i].u1.s.NameOffset);
|
||||
else
|
||||
name = (LPWSTR)et[i].u1.Name;
|
||||
name = (LPWSTR)(int)et[i].u1.Id;
|
||||
ret = lpfun(hmod,type,name,lparam);
|
||||
if (!ret)
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue