Mask out the upper 12 bits from the resourceid, just like win95 does.

This commit is contained in:
Marcus Meissner 1999-03-13 12:49:31 +00:00 committed by Alexandre Julliard
parent 5cc04eb4b3
commit 1a27fe6b1a

View file

@ -856,7 +856,9 @@ INT WINAPI LoadStringW( HINSTANCE instance, UINT resource_id,
TRACE(resource, "instance = %04x, id = %04x, buffer = %08x, "
"length = %d\n", instance, (int)resource_id, (int) buffer, buflen);
hrsrc = FindResourceW( instance, (LPCWSTR)((resource_id>>4)+1),
/* Use bits 4 - 19 (incremented by 1) as resourceid, mask out
* 20 - 31. */
hrsrc = FindResourceW( instance, (LPCWSTR)(((resource_id>>4)&0xffff)+1),
RT_STRINGW );
if (!hrsrc) return 0;
hmem = LoadResource( instance, hrsrc );