[Wine-patches] regedit: backslashes escaping (fix eterbug #3684)
Konstantin Kondratyuk
=?iso-8859-1?q?kondratyuk_=CE=C1_etersoft=2Eru?=
Пн Мар 23 10:52:09 MSK 2009
--
Best regards,
Konstantin Kondratyuk.
----------- следующая часть -----------
From aff530ecbd1e0b0c0b5a569da0bbf4f960742d0b Mon Sep 17 00:00:00 2001
From: Konstantin Kondratyuk <kondratyuk на etersoft.ru>
Date: Mon, 23 Mar 2009 10:43:55 +0300
Subject: [PATCH] regedit: backslash escaping
---
programs/regedit/regproc.c | 11 ++++++++---
1 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/programs/regedit/regproc.c b/programs/regedit/regproc.c
index 47f9832..af4bedf 100644
--- a/programs/regedit/regproc.c
+++ b/programs/regedit/regproc.c
@@ -1105,11 +1105,16 @@ static void export_hkey(FILE *file, HKEY key,
i++;
if ((*val_name_buf)[0]) {
- const WCHAR val_start[] = {'"','%','s','"','=',0};
+ const WCHAR val_start[] = {'"',0};
+ const WCHAR val_end[] = {'"','=',0};
- line_len = 3 + lstrlenW(*val_name_buf);
+ line_len = lstrlenW(val_start);
REGPROC_resize_char_buffer(line_buf, line_buf_size, line_len);
- sprintfW(*line_buf, val_start, *val_name_buf);
+ lstrcpyW(*line_buf,val_start);
+ REGPROC_export_string(line_buf, line_buf_size, &line_len, *val_name_buf, lstrlenW(*val_name_buf));
+ REGPROC_resize_char_buffer(line_buf, line_buf_size, line_len+lstrlenW(val_end));
+ lstrcpyW(*line_buf + line_len, val_end);
+ line_len += lstrlenW(val_end);
} else {
const WCHAR std_val[] = {'@','=',0};
line_len = 2;
--
1.6.1.3.GIT
Подробная информация о списке рассылки Wine-patches