Signed-off-by: Hugh McMaster hugh.mcmaster@outlook.com --- programs/conhost/window.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/programs/conhost/window.c b/programs/conhost/window.c index 4033eefa313..5881ad9c3ad 100644 --- a/programs/conhost/window.c +++ b/programs/conhost/window.c @@ -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) );