regedit: Allow importing/exporting strings with '\r'.

oldstable
Bruno Jesus 2014-10-29 23:55:08 -02:00 committed by Alexandre Julliard
parent 00c25959d1
commit 84d7239640
1 changed files with 10 additions and 0 deletions

View File

@ -267,6 +267,9 @@ static int REGPROC_unescape_string(WCHAR* str)
case 'n':
str[val_idx] = '\n';
break;
case 'r':
str[val_idx] = '\r';
break;
case '0':
str[val_idx] = '\0';
break;
@ -963,6 +966,13 @@ static void REGPROC_export_string(WCHAR **line_buf, DWORD *line_buf_size, DWORD
(*line_buf)[pos++] = 'n';
break;
case '\r':
extra++;
REGPROC_resize_char_buffer(line_buf, line_buf_size, *line_len + str_len + extra);
(*line_buf)[pos++] = '\\';
(*line_buf)[pos++] = 'r';
break;
case '\\':
case '"':
extra++;