@@ -281,13 +281,13 @@ Imm32WriteImeLayout(
281281 goto Failure ;
282282
283283 /* Write "Ime File" */
284- cbData = (wcslen (pchFileTitle ) + 1 ) * sizeof (WCHAR );
284+ cbData = (DWORD )(( wcslen (pchFileTitle ) + 1 ) * sizeof (WCHAR ) );
285285 lError = RegSetValueExW (hkeyIME , L"Ime File" , 0 , REG_SZ , (LPBYTE )pchFileTitle , cbData );
286286 if (IS_ERROR_UNEXPECTEDLY (lError ))
287287 goto Failure ;
288288
289289 /* Write "Layout Text" */
290- cbData = (wcslen (pszLayoutText ) + 1 ) * sizeof (WCHAR );
290+ cbData = (DWORD )(( wcslen (pszLayoutText ) + 1 ) * sizeof (WCHAR ) );
291291 lError = RegSetValueExW (hkeyIME , L"Layout Text" , 0 , REG_SZ , (LPBYTE )pszLayoutText , cbData );
292292 if (IS_ERROR_UNEXPECTEDLY (lError ))
293293 goto Failure ;
@@ -302,7 +302,7 @@ Imm32WriteImeLayout(
302302 }
303303
304304 /* Write "Layout File" */
305- cbData = (wcslen (pszLayoutFile ) + 1 ) * sizeof (WCHAR );
305+ cbData = (DWORD )(( wcslen (pszLayoutFile ) + 1 ) * sizeof (WCHAR ) );
306306 lError = RegSetValueExW (hkeyIME , L"Layout File" , 0 , REG_SZ , (LPBYTE )pszLayoutFile , cbData );
307307 if (IS_ERROR_UNEXPECTEDLY (lError ))
308308 goto Failure ;
@@ -337,7 +337,7 @@ Imm32WriteImeLayout(
337337#undef MAX_PRELOAD
338338
339339 /* Write the IME key to the preload number */
340- cbData = (wcslen (szImeKey ) + 1 ) * sizeof (WCHAR );
340+ cbData = (DWORD )(( wcslen (szImeKey ) + 1 ) * sizeof (WCHAR ) );
341341 lError = RegSetValueExW (hkeyPreload , szPreloadNumber , 0 , REG_SZ , (LPBYTE )szImeKey , cbData );
342342 RegCloseKey (hkeyPreload );
343343 return lError == ERROR_SUCCESS ;
0 commit comments