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
c02dd08f
Commit
c02dd08f
authored
Oct 16, 2017
by
Hugh McMaster
Committed by
Alexandre Julliard
Oct 16, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
reg/tests: Correctly import hex values with no data.
Signed-off-by:
Hugh McMaster
<
hugh.mcmaster@outlook.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
84dda235
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
4 deletions
+8
-4
import.c
programs/reg/import.c
+4
-0
reg.c
programs/reg/tests/reg.c
+4
-4
No files found.
programs/reg/import.c
View file @
c02dd08f
...
@@ -785,6 +785,9 @@ static WCHAR *hex_data_state(struct parser *parser, WCHAR *pos)
...
@@ -785,6 +785,9 @@ static WCHAR *hex_data_state(struct parser *parser, WCHAR *pos)
{
{
WCHAR
*
line
=
pos
;
WCHAR
*
line
=
pos
;
if
(
!*
line
)
goto
set_value
;
if
(
!
convert_hex_csv_to_hex
(
parser
,
&
line
))
if
(
!
convert_hex_csv_to_hex
(
parser
,
&
line
))
goto
invalid
;
goto
invalid
;
...
@@ -796,6 +799,7 @@ static WCHAR *hex_data_state(struct parser *parser, WCHAR *pos)
...
@@ -796,6 +799,7 @@ static WCHAR *hex_data_state(struct parser *parser, WCHAR *pos)
prepare_hex_string_data
(
parser
);
prepare_hex_string_data
(
parser
);
set_value:
set_state
(
parser
,
SET_VALUE
);
set_state
(
parser
,
SET_VALUE
);
return
line
;
return
line
;
...
...
programs/reg/tests/reg.c
View file @
c02dd08f
...
@@ -2322,10 +2322,10 @@ static void test_import(void)
...
@@ -2322,10 +2322,10 @@ static void test_import(void)
"
\"
Wine68i
\"
=hex(0):
\n\n
"
,
&
r
);
"
\"
Wine68i
\"
=hex(0):
\n\n
"
,
&
r
);
ok
(
r
==
REG_EXIT_SUCCESS
,
"got exit code %d, expected 0
\n
"
,
r
);
ok
(
r
==
REG_EXIT_SUCCESS
,
"got exit code %d, expected 0
\n
"
,
r
);
verify_reg
(
hkey
,
"Wine68a"
,
REG_SZ
,
NULL
,
0
,
0
);
verify_reg
(
hkey
,
"Wine68a"
,
REG_SZ
,
NULL
,
0
,
0
);
verify_reg
(
hkey
,
"Wine68b"
,
REG_EXPAND_SZ
,
NULL
,
0
,
TODO_REG_SIZE
);
verify_reg
(
hkey
,
"Wine68b"
,
REG_EXPAND_SZ
,
NULL
,
0
,
0
);
verify_reg
(
hkey
,
"Wine68c"
,
REG_BINARY
,
NULL
,
0
,
0
);
verify_reg
(
hkey
,
"Wine68c"
,
REG_BINARY
,
NULL
,
0
,
0
);
verify_reg
(
hkey
,
"Wine68d"
,
REG_DWORD
,
NULL
,
0
,
0
);
verify_reg
(
hkey
,
"Wine68d"
,
REG_DWORD
,
NULL
,
0
,
0
);
verify_reg
(
hkey
,
"Wine68e"
,
REG_MULTI_SZ
,
NULL
,
0
,
TODO_REG_SIZE
);
verify_reg
(
hkey
,
"Wine68e"
,
REG_MULTI_SZ
,
NULL
,
0
,
0
);
verify_reg
(
hkey
,
"Wine68f"
,
0x100
,
NULL
,
0
,
0
);
verify_reg
(
hkey
,
"Wine68f"
,
0x100
,
NULL
,
0
,
0
);
verify_reg
(
hkey
,
"Wine68g"
,
0xabcd
,
NULL
,
0
,
0
);
verify_reg
(
hkey
,
"Wine68g"
,
0xabcd
,
NULL
,
0
,
0
);
verify_reg
(
hkey
,
"Wine68h"
,
REG_BINARY
,
NULL
,
0
,
0
);
verify_reg
(
hkey
,
"Wine68h"
,
REG_BINARY
,
NULL
,
0
,
0
);
...
@@ -3830,10 +3830,10 @@ static void test_unicode_import(void)
...
@@ -3830,10 +3830,10 @@ static void test_unicode_import(void)
"
\"
Wine68i
\"
=hex(0):
\n\n
"
,
&
r
);
"
\"
Wine68i
\"
=hex(0):
\n\n
"
,
&
r
);
ok
(
r
==
REG_EXIT_SUCCESS
,
"got exit code %d, expected 0
\n
"
,
r
);
ok
(
r
==
REG_EXIT_SUCCESS
,
"got exit code %d, expected 0
\n
"
,
r
);
verify_reg
(
hkey
,
"Wine68a"
,
REG_SZ
,
NULL
,
0
,
0
);
verify_reg
(
hkey
,
"Wine68a"
,
REG_SZ
,
NULL
,
0
,
0
);
verify_reg
(
hkey
,
"Wine68b"
,
REG_EXPAND_SZ
,
NULL
,
0
,
TODO_REG_SIZE
);
verify_reg
(
hkey
,
"Wine68b"
,
REG_EXPAND_SZ
,
NULL
,
0
,
0
);
verify_reg
(
hkey
,
"Wine68c"
,
REG_BINARY
,
NULL
,
0
,
0
);
verify_reg
(
hkey
,
"Wine68c"
,
REG_BINARY
,
NULL
,
0
,
0
);
verify_reg
(
hkey
,
"Wine68d"
,
REG_DWORD
,
NULL
,
0
,
0
);
verify_reg
(
hkey
,
"Wine68d"
,
REG_DWORD
,
NULL
,
0
,
0
);
verify_reg
(
hkey
,
"Wine68e"
,
REG_MULTI_SZ
,
NULL
,
0
,
TODO_REG_SIZE
);
verify_reg
(
hkey
,
"Wine68e"
,
REG_MULTI_SZ
,
NULL
,
0
,
0
);
verify_reg
(
hkey
,
"Wine68f"
,
0x100
,
NULL
,
0
,
0
);
verify_reg
(
hkey
,
"Wine68f"
,
0x100
,
NULL
,
0
,
0
);
verify_reg
(
hkey
,
"Wine68g"
,
0xabcd
,
NULL
,
0
,
0
);
verify_reg
(
hkey
,
"Wine68g"
,
0xabcd
,
NULL
,
0
,
0
);
verify_reg
(
hkey
,
"Wine68h"
,
REG_BINARY
,
NULL
,
0
,
0
);
verify_reg
(
hkey
,
"Wine68h"
,
REG_BINARY
,
NULL
,
0
,
0
);
...
...
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