conhost: Use correct size when storing font FaceName in the registry.

Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Hugh McMaster 2021-08-09 21:52:29 +10:00 committed by Alexandre Julliard
parent 8bf2603838
commit bd9db4b6de
1 changed files with 2 additions and 1 deletions

View File

@ -303,7 +303,8 @@ static void save_registry_key( HKEY key, const struct console_config *config )
val = config->edition_mode;
RegSetValueExW( key, L"EditionMode", 0, REG_DWORD, (BYTE *)&val, sizeof(val) );
RegSetValueExW( key, L"FaceName", 0, REG_SZ, (BYTE *)&config->face_name, sizeof(config->face_name) );
RegSetValueExW( key, L"FaceName", 0, REG_SZ, (BYTE *)&config->face_name,
(lstrlenW(config->face_name) + 1) * sizeof(WCHAR) );
val = config->font_pitch_family;
RegSetValueExW( key, L"FontPitchFamily", 0, REG_DWORD, (BYTE *)&val, sizeof(val) );