Commit 9724c6d7 authored by Andrey Turkin's avatar Andrey Turkin Committed by Alexandre Julliard

oleaut32: Fix ctl2_alloc_importfile offset calculations.

parent 18b310a7
......@@ -779,8 +779,8 @@ static int ctl2_alloc_importfile(
encoded_string[0] |= 1;
for (offset = 0; offset < This->typelib_segdir[MSFT_SEG_IMPORTFILES].length;
offset += ((((This->typelib_segment_data[MSFT_SEG_IMPORTFILES][offset + 0xd] << 8) & 0xff)
| (This->typelib_segment_data[MSFT_SEG_IMPORTFILES][offset + 0xc] & 0xff)) >> 2) + 0xc) {
offset += ((((((This->typelib_segment_data[MSFT_SEG_IMPORTFILES][offset + 0xd] << 8) & 0xff00)
| (This->typelib_segment_data[MSFT_SEG_IMPORTFILES][offset + 0xc] & 0xff)) >> 2) + 5) & 0xfffc) + 0xc) {
if (!memcmp(encoded_string, This->typelib_segment_data[MSFT_SEG_IMPORTFILES] + offset + 0xc, length)) return offset;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment