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
c880ccea
Commit
c880ccea
authored
Nov 23, 2008
by
Francois Gouget
Committed by
Alexandre Julliard
Nov 24, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
regedit: Fix handling of zero-byte binary values for 'regedit /E'.
parent
cc851167
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
18 deletions
+21
-18
regproc.c
programs/regedit/regproc.c
+21
-18
No files found.
programs/regedit/regproc.c
View file @
c880ccea
...
...
@@ -927,12 +927,10 @@ static void REGPROC_export_string(WCHAR **line_buf, DWORD *line_buf_size, DWORD
static
void
REGPROC_export_binary
(
WCHAR
**
line_buf
,
DWORD
*
line_buf_size
,
DWORD
*
line_len
,
DWORD
type
,
BYTE
*
value
,
DWORD
value_size
,
BOOL
unicode
)
{
DWORD
i
,
hex_pos
,
data_pos
,
column
;
DWORD
hex_pos
,
data_pos
;
const
WCHAR
*
hex_prefix
;
const
WCHAR
hex
[]
=
{
'h'
,
'e'
,
'x'
,
':'
,
0
};
WCHAR
hex_buf
[
17
];
const
WCHAR
format
[]
=
{
'%'
,
'0'
,
'2'
,
'x'
,
0
};
const
WCHAR
comma
[]
=
{
','
,
0
};
const
WCHAR
concat
[]
=
{
'\\'
,
'\n'
,
' '
,
' '
,
0
};
DWORD
concat_prefix
,
concat_len
;
const
WCHAR
newline
[]
=
{
'\n'
,
0
};
...
...
@@ -969,24 +967,29 @@ static void REGPROC_export_binary(WCHAR **line_buf, DWORD *line_buf_size, DWORD
*
line_len
+=
*
line_len
/
(
REG_FILE_HEX_LINE_LEN
-
concat_prefix
)
*
concat_len
;
REGPROC_resize_char_buffer
(
line_buf
,
line_buf_size
,
*
line_len
);
lstrcpyW
(
*
line_buf
+
hex_pos
,
hex_prefix
);
column
=
data_pos
;
/* no line wrap yet */
i
=
0
;
while
(
1
)
if
(
value_size
)
{
sprintfW
(
*
line_buf
+
data_pos
,
format
,
(
unsigned
int
)
value
[
i
]);
data_pos
+=
2
;
if
(
++
i
==
value_size
)
break
;
const
WCHAR
format
[]
=
{
'%'
,
'0'
,
'2'
,
'x'
,
0
};
DWORD
i
,
column
;
column
=
data_pos
;
/* no line wrap yet */
i
=
0
;
while
(
1
)
{
sprintfW
(
*
line_buf
+
data_pos
,
format
,
(
unsigned
int
)
value
[
i
]);
data_pos
+=
2
;
if
(
++
i
==
value_size
)
break
;
lstrcpyW
(
*
line_buf
+
data_pos
,
comma
);
data_pos
++
;
column
+=
3
;
(
*
line_buf
)[
data_pos
++
]
=
','
;
column
+=
3
;
/* wrap the line */
if
(
column
>=
REG_FILE_HEX_LINE_LEN
)
{
lstrcpyW
(
*
line_buf
+
data_pos
,
concat
);
data_pos
+=
concat_len
;
column
=
concat_prefix
;
/* wrap the line */
if
(
column
>=
REG_FILE_HEX_LINE_LEN
)
{
lstrcpyW
(
*
line_buf
+
data_pos
,
concat
);
data_pos
+=
concat_len
;
column
=
concat_prefix
;
}
}
}
lstrcpyW
(
*
line_buf
+
data_pos
,
newline
);
...
...
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