Commit 1f71ea31 authored by Alexandre Julliard's avatar Alexandre Julliard

ole32: Fix sign expansion of codepage values.

parent d0b400c9
......@@ -802,7 +802,7 @@ static HRESULT WINAPI IPropertyStorage_fnWriteMultiple(
if (dictionary_num_entries(This->propid_to_prop) == 0 &&
rgpropvar[i].vt == VT_I2)
{
This->codePage = rgpropvar[i].iVal;
This->codePage = (USHORT)rgpropvar[i].iVal;
if (This->codePage == CP_UNICODE)
This->grfFlags &= ~PROPSETFLAG_ANSI;
else
......@@ -1868,7 +1868,7 @@ static HRESULT PropertyStorage_ReadFromStream(PropertyStorage_impl *This)
{
case PID_CODEPAGE:
if (prop.vt == VT_I2)
This->codePage = (UINT)prop.iVal;
This->codePage = (USHORT)prop.iVal;
break;
case PID_LOCALE:
if (prop.vt == VT_I4)
......
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