reg: Allow either lowercase or uppercase 'x' when used with REG_DWORD.
Signed-off-by: Hugh McMaster <hugh.mcmaster@outlook.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
38f579f9ba
commit
5e6429520b
|
@ -243,7 +243,7 @@ static LPBYTE get_regdata(LPWSTR data, DWORD reg_type, WCHAR separator, DWORD *r
|
|||
{
|
||||
LPWSTR rest;
|
||||
DWORD val;
|
||||
val = strtoulW(data, &rest, (data[1] == 'x') ? 16 : 10);
|
||||
val = strtoulW(data, &rest, (tolowerW(data[1]) == 'x') ? 16 : 10);
|
||||
if (*rest || data[0] == '-') {
|
||||
output_message(STRING_MISSING_INTEGER);
|
||||
break;
|
||||
|
|
|
@ -298,6 +298,11 @@ static void test_add(void)
|
|||
run_reg_exe("reg add HKCU\\" KEY_BASE " /v dword13 /t REG_DWORD /d 00x123 /f", &r);
|
||||
ok(r == REG_EXIT_FAILURE, "got exit code %d, expected 1\n", r);
|
||||
|
||||
run_reg_exe("reg add HKCU\\" KEY_BASE " /v dword14 /t REG_DWORD /d 0X123 /f", &r);
|
||||
ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r);
|
||||
dword = 0x123;
|
||||
verify_reg(hkey, "dword14", REG_DWORD, &dword, sizeof(dword), 0);
|
||||
|
||||
/* REG_DWORD_LITTLE_ENDIAN */
|
||||
run_reg_exe("reg add HKCU\\" KEY_BASE " /v DWORD_LE /t REG_DWORD_LITTLE_ENDIAN /d 456 /f", &r);
|
||||
ok(r == REG_EXIT_SUCCESS, "got exit code %d, expected 0\n", r);
|
||||
|
|
Loading…
Reference in New Issue