Commit e8d117f5 authored by Piotr Caban's avatar Piotr Caban Committed by Alexandre Julliard

oleaut32: Fix importfile searching in ctl2_alloc_importinfo.

parent b6cf636c
...@@ -692,19 +692,20 @@ static int ctl2_alloc_string( ...@@ -692,19 +692,20 @@ static int ctl2_alloc_string(
* Failure: -1 (this is invariably an out of memory condition). * Failure: -1 (this is invariably an out of memory condition).
*/ */
static int ctl2_alloc_importinfo( static int ctl2_alloc_importinfo(
ICreateTypeLib2Impl *This, /* [I] The type library to allocate in. */ ICreateTypeLib2Impl *This, /* [I] The type library to allocate in. */
MSFT_ImpInfo *impinfo) /* [I] The import information to store. */ MSFT_ImpInfo *impinfo) /* [I] The import information to store. */
{ {
int offset; int offset;
MSFT_ImpInfo *impinfo_space; MSFT_ImpInfo *impinfo_space;
for (offset = 0; impinfo_space = (MSFT_ImpInfo*)&This->typelib_segment_data[MSFT_SEG_IMPORTINFO][0];
offset < This->typelib_segdir[MSFT_SEG_IMPORTINFO].length; for (offset=0; offset<This->typelib_segdir[MSFT_SEG_IMPORTINFO].length;
offset += sizeof(MSFT_ImpInfo)) { offset+=sizeof(MSFT_ImpInfo)) {
if (!memcmp(&(This->typelib_segment_data[MSFT_SEG_IMPORTINFO][offset]), if(impinfo_space->oImpFile == impinfo->oImpFile
impinfo, sizeof(MSFT_ImpInfo))) { && impinfo_space->oGuid == impinfo->oGuid)
return offset; return offset;
}
impinfo_space += 1;
} }
impinfo->flags |= This->typelib_header.nimpinfos++; impinfo->flags |= This->typelib_header.nimpinfos++;
......
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