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
4ef47776
Commit
4ef47776
authored
Jul 13, 2008
by
Alexander Nicolaysen Sørnes
Committed by
Alexandre Julliard
Jul 14, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
regedit: Fix concat handling in unicode import.
parent
bd2734d9
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
19 deletions
+23
-19
regproc.c
programs/regedit/regproc.c
+23
-19
No files found.
programs/regedit/regproc.c
View file @
4ef47776
...
@@ -704,7 +704,7 @@ void processRegLinesW(FILE *in)
...
@@ -704,7 +704,7 @@ void processRegLinesW(FILE *in)
{
{
WCHAR
*
buf
=
NULL
;
/* line read from input stream */
WCHAR
*
buf
=
NULL
;
/* line read from input stream */
ULONG
lineSize
=
REG_VAL_BUF_SIZE
;
ULONG
lineSize
=
REG_VAL_BUF_SIZE
;
size_t
check
=
-
1
;
size_t
CharsInBuf
=
-
1
;
WCHAR
*
s
;
/* The pointer into line for where the current fgets should read */
WCHAR
*
s
;
/* The pointer into line for where the current fgets should read */
...
@@ -741,10 +741,10 @@ void processRegLinesW(FILE *in)
...
@@ -741,10 +741,10 @@ void processRegLinesW(FILE *in)
*/
*/
size_to_get
=
(
size_remaining
>
INT_MAX
?
INT_MAX
:
size_remaining
);
size_to_get
=
(
size_remaining
>
INT_MAX
?
INT_MAX
:
size_remaining
);
check
=
fread
(
s
,
sizeof
(
WCHAR
),
size_to_get
-
1
,
in
);
CharsInBuf
=
fread
(
s
,
sizeof
(
WCHAR
),
size_to_get
-
1
,
in
);
s
[
check
]
=
0
;
s
[
CharsInBuf
]
=
0
;
if
(
check
==
0
)
{
if
(
CharsInBuf
==
0
)
{
if
(
ferror
(
in
))
{
if
(
ferror
(
in
))
{
perror
(
"While reading input"
);
perror
(
"While reading input"
);
exit
(
IO_ERROR
);
exit
(
IO_ERROR
);
...
@@ -772,6 +772,25 @@ void processRegLinesW(FILE *in)
...
@@ -772,6 +772,25 @@ void processRegLinesW(FILE *in)
continue
;
continue
;
}
}
/* If there is a concatenating \\ then go around again */
if
((
*
(
s_eol
-
1
)
==
'\\'
)
||
(
*
(
s_eol
-
1
)
==
'\r'
&&
*
(
s_eol
-
2
)
==
'\\'
))
{
WCHAR
*
NextLine
=
s_eol
;
while
(
*
(
NextLine
+
1
)
==
' '
||
*
(
NextLine
+
1
)
==
'\t'
)
NextLine
++
;
NextLine
++
;
if
(
*
(
s_eol
-
1
)
==
'\r'
)
s_eol
--
;
MoveMemory
(
s_eol
-
1
,
NextLine
,
(
CharsInBuf
-
(
NextLine
-
buf
)
+
1
)
*
sizeof
(
WCHAR
));
CharsInBuf
-=
NextLine
-
s_eol
+
1
;
s_eol
=
0
;
continue
;
}
/* Remove any line feed. Leave s_eol on the \0 */
/* Remove any line feed. Leave s_eol on the \0 */
if
(
s_eol
)
{
if
(
s_eol
)
{
*
s_eol
=
'\0'
;
*
s_eol
=
'\0'
;
...
@@ -779,21 +798,6 @@ void processRegLinesW(FILE *in)
...
@@ -779,21 +798,6 @@ void processRegLinesW(FILE *in)
*
(
s_eol
-
1
)
=
'\0'
;
*
(
s_eol
-
1
)
=
'\0'
;
}
}
/* If there is a concatenating \\ then go around again */
if
(
s_eol
>
buf
&&
*
(
s_eol
-
1
)
==
'\\'
)
{
WCHAR
c
[
2
];
s
=
s_eol
+
1
;
/* The following error protection could be made more self-
* correcting but I thought it not worth trying.
*/
if
(
!
fread
(
&
c
,
sizeof
(
WCHAR
),
2
,
in
))
break
;
if
(
feof
(
in
)
||
c
[
0
]
!=
' '
||
c
[
1
]
!=
' '
)
fprintf
(
stderr
,
"%s: ERROR - invalid continuation.
\n
"
,
getAppName
());
continue
;
}
if
(
!
s_eol
)
if
(
!
s_eol
)
break
;
break
;
...
...
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