mirror of
https://github.com/GerbilSoft/rom-properties.git
synced 2025-06-18 11:35:38 -04:00
[libromdata] NEResourceReader::lookup_resource_ID(): OR the type with 0x8000.
With Win16, the high bit needs to be set for ordinal resources. Otherwise, it's a named resource, which we don't support right now. Thumbnailing still worked because we were using the code path for the "first" icon using NEResourceReader::open(), which had the `| 0x8000` bit already.
This commit is contained in:
parent
65a3855b98
commit
acdf3544e1
@ -816,8 +816,12 @@ int NEResourceReader::lookup_resource_ID(int type, int index)
|
|||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// NOTE: Type and resource IDs have the high bit set for integers.
|
||||||
|
// We're only supporting integer IDs, so set the high bits here.
|
||||||
|
type |= 0x8000;
|
||||||
|
|
||||||
// Get the resource directory for this type.
|
// Get the resource directory for this type.
|
||||||
RP_D(NEResourceReader);
|
RP_D(const NEResourceReader);
|
||||||
auto iter_find = d->res_types.find(type);
|
auto iter_find = d->res_types.find(type);
|
||||||
if (iter_find == d->res_types.end()) {
|
if (iter_find == d->res_types.end()) {
|
||||||
// Not found.
|
// Not found.
|
||||||
|
Loading…
Reference in New Issue
Block a user