Commit a357a29a authored by Aric Stewart's avatar Aric Stewart Committed by Alexandre Julliard

winex11.drv: Correct sizes in COMPOSITIONSTRING structure when updating fields.

parent 877a628a
......@@ -217,11 +217,11 @@ static HIMCC updateCompStr(HIMCC old, LPCWSTR compstr, DWORD len)
{
needed_size += lpcs->dwCompReadAttrLen;
needed_size += lpcs->dwCompReadClauseLen;
needed_size += lpcs->dwCompReadStrLen * sizeof(DWORD);
needed_size += lpcs->dwCompReadStrLen * sizeof(WCHAR);
needed_size += lpcs->dwResultReadClauseLen;
needed_size += lpcs->dwResultReadStrLen * sizeof(DWORD);
needed_size += lpcs->dwResultReadStrLen * sizeof(WCHAR);
needed_size += lpcs->dwResultClauseLen;
needed_size += lpcs->dwResultStrLen * sizeof(DWORD);
needed_size += lpcs->dwResultStrLen * sizeof(WCHAR);
needed_size += lpcs->dwPrivateSize;
}
rc = ImmCreateIMCC(needed_size);
......@@ -304,6 +304,8 @@ static HIMCC updateCompStr(HIMCC old, LPCWSTR compstr, DWORD len)
*(DWORD*)(&newdata[current_offset]) = len;
current_offset += sizeof(DWORD);
}
else
new_one->dwCompClauseLen = 0;
/* CompStr */
new_one->dwCompStrLen = len;
......@@ -359,12 +361,12 @@ static HIMCC updateResultStr(HIMCC old, LPWSTR resultstr, DWORD len)
{
needed_size += lpcs->dwCompReadAttrLen;
needed_size += lpcs->dwCompReadClauseLen;
needed_size += lpcs->dwCompReadStrLen * sizeof(DWORD);
needed_size += lpcs->dwCompReadStrLen * sizeof(WCHAR);
needed_size += lpcs->dwCompAttrLen;
needed_size += lpcs->dwCompClauseLen;
needed_size += lpcs->dwCompStrLen * sizeof(DWORD);
needed_size += lpcs->dwCompStrLen * sizeof(WCHAR);
needed_size += lpcs->dwResultReadClauseLen;
needed_size += lpcs->dwResultReadStrLen * sizeof(DWORD);
needed_size += lpcs->dwResultReadStrLen * sizeof(WCHAR);
needed_size += lpcs->dwPrivateSize;
}
rc = ImmCreateIMCC(needed_size);
......@@ -446,6 +448,8 @@ static HIMCC updateResultStr(HIMCC old, LPWSTR resultstr, DWORD len)
*(DWORD*)(&newdata[current_offset]) = len;
current_offset += sizeof(DWORD);
}
else
new_one->dwResultClauseLen = 0;
/* ResultStr */
new_one->dwResultStrLen = len;
......
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