Module: wine Branch: master Commit: 1f71ea3106d41a0cc392fc626a3ecd7c890425fd URL: https://source.winehq.org/git/wine.git/?a=commit;h=1f71ea3106d41a0cc392fc626...
Author: Alexandre Julliard julliard@winehq.org Date: Thu Apr 14 09:44:16 2022 +0200
ole32: Fix sign expansion of codepage values.
Signed-off-by: Alexandre Julliard julliard@winehq.org
---
dlls/ole32/stg_prop.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/dlls/ole32/stg_prop.c b/dlls/ole32/stg_prop.c index 28793d7cbd5..8efb8ed5543 100644 --- a/dlls/ole32/stg_prop.c +++ b/dlls/ole32/stg_prop.c @@ -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)