Module: wine Branch: master Commit: 01b0746906bf2f570e5faca68714076384d0f600 URL: http://source.winehq.org/git/wine.git/?a=commit;h=01b0746906bf2f570e5faca687...
Author: Bruno Jesus 00cpxxx@gmail.com Date: Fri Oct 24 22:01:02 2014 -0200
regedit: Append exported strings using the correct size.
---
programs/regedit/regproc.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/programs/regedit/regproc.c b/programs/regedit/regproc.c index 18b6e98..d07fdc7 100644 --- a/programs/regedit/regproc.c +++ b/programs/regedit/regproc.c @@ -1180,10 +1180,7 @@ static void export_hkey(FILE *file, HKEY key, lstrcpyW(*line_buf + line_len, start); line_len += len;
- /* At this point we know wstr is '\0'-terminated - * so we can subtract 1 from the size - */ - REGPROC_export_string(line_buf, line_buf_size, &line_len, wstr, val_size1 / sizeof(WCHAR) - 1); + REGPROC_export_string(line_buf, line_buf_size, &line_len, wstr, lstrlenW(wstr));
REGPROC_resize_char_buffer(line_buf, line_buf_size, line_len + lstrlenW(end)); lstrcpyW(*line_buf + line_len, end);