Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
1e0a7762
Commit
1e0a7762
authored
Sep 21, 2008
by
Alexander Nicolaysen Sørnes
Committed by
Alexandre Julliard
Sep 22, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
regedit: Fix char escaping for registry export.
parent
e46e095c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
12 deletions
+11
-12
regproc.c
programs/regedit/regproc.c
+11
-12
No files found.
programs/regedit/regproc.c
View file @
1e0a7762
...
@@ -885,7 +885,7 @@ static void REGPROC_export_string(WCHAR **line_buf, DWORD *line_buf_size, DWORD
...
@@ -885,7 +885,7 @@ static void REGPROC_export_string(WCHAR **line_buf, DWORD *line_buf_size, DWORD
DWORD
i
;
DWORD
i
;
DWORD
extra
=
0
;
DWORD
extra
=
0
;
REGPROC_resize_char_buffer
(
line_buf
,
line_buf_size
,
len
+
10
);
REGPROC_resize_char_buffer
(
line_buf
,
line_buf_size
,
len
+
*
line_size
+
10
);
/* escaping characters */
/* escaping characters */
for
(
i
=
0
;
i
<
len
;
i
++
)
{
for
(
i
=
0
;
i
<
len
;
i
++
)
{
...
@@ -895,37 +895,36 @@ static void REGPROC_export_string(WCHAR **line_buf, DWORD *line_buf_size, DWORD
...
@@ -895,37 +895,36 @@ static void REGPROC_export_string(WCHAR **line_buf, DWORD *line_buf_size, DWORD
{
{
const
WCHAR
escape
[]
=
{
'\\'
,
'\\'
};
const
WCHAR
escape
[]
=
{
'\\'
,
'\\'
};
REGPROC_resize_char_buffer
(
line_buf
,
line_buf_size
,
len
+
*
line_size
+
extra
+
1
);
memcpy
(
*
line_buf
+
*
line_size
+
i
+
extra
-
1
,
escape
,
2
*
sizeof
(
WCHAR
));
extra
++
;
extra
++
;
REGPROC_resize_char_buffer
(
line_buf
,
line_buf_size
,
len
+
extra
);
memcpy
(
*
line_buf
+
*
line_size
-
1
,
escape
,
2
*
sizeof
(
WCHAR
));
break
;
break
;
}
}
case
'
\
"'
:
case
'"'
:
{
{
const
WCHAR
escape
[]
=
{
'\\'
,
'"'
};
const
WCHAR
escape
[]
=
{
'\\'
,
'"'
};
REGPROC_resize_char_buffer
(
line_buf
,
line_buf_size
,
len
+
*
line_size
+
extra
+
1
);
memcpy
(
*
line_buf
+
*
line_size
+
i
+
extra
-
1
,
escape
,
2
*
sizeof
(
WCHAR
));
extra
++
;
extra
++
;
REGPROC_resize_char_buffer
(
line_buf
,
line_buf_size
,
len
+
extra
);
memcpy
(
*
line_buf
+
*
line_size
-
1
,
escape
,
2
*
sizeof
(
WCHAR
));
break
;
break
;
}
}
case
'\n'
:
case
'\n'
:
{
{
const
WCHAR
escape
[]
=
{
'\\'
,
'
\
n'
};
const
WCHAR
escape
[]
=
{
'\\'
,
'n'
};
REGPROC_resize_char_buffer
(
line_buf
,
line_buf_size
,
len
+
*
line_size
+
extra
+
1
);
memcpy
(
*
line_buf
+
*
line_size
+
i
+
extra
-
1
,
escape
,
2
*
sizeof
(
WCHAR
));
extra
++
;
extra
++
;
REGPROC_resize_char_buffer
(
line_buf
,
line_buf_size
,
len
+
extra
);
memcpy
(
*
line_buf
+
*
line_size
-
1
,
escape
,
2
*
sizeof
(
WCHAR
));
break
;
break
;
}
}
default:
default:
memcpy
(
*
line_buf
+
*
line_size
-
1
,
&
c
,
sizeof
(
WCHAR
));
memcpy
(
*
line_buf
+
*
line_size
+
i
+
extra
-
1
,
&
c
,
sizeof
(
WCHAR
));
break
;
break
;
}
}
*
line_size
+=
1
;
}
}
*
line_size
+=
len
+
extra
;
*
(
*
line_buf
+
*
line_size
-
1
)
=
0
;
*
(
*
line_buf
+
*
line_size
-
1
)
=
0
;
*
line_size
+=
extra
;
}
}
/******************************************************************************
/******************************************************************************
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment