Commit cb555215 authored by Akihiro Sagawa's avatar Akihiro Sagawa Committed by Alexandre Julliard

advapi32: Fix the error code on parse failure.

parent e798d25f
...@@ -3273,7 +3273,7 @@ LSTATUS WINAPI RegLoadMUIStringW(HKEY hKey, LPCWSTR pwszValue, LPWSTR pwszBuffer ...@@ -3273,7 +3273,7 @@ LSTATUS WINAPI RegLoadMUIStringW(HKEY hKey, LPCWSTR pwszValue, LPWSTR pwszBuffer
/* Format of the expanded value is 'path_to_dll,-resId' */ /* Format of the expanded value is 'path_to_dll,-resId' */
if (!pComma || pComma[1] != '-') { if (!pComma || pComma[1] != '-') {
result = ERROR_BADKEY; result = ERROR_INVALID_DATA;
goto cleanup; goto cleanup;
} }
......
...@@ -3859,7 +3859,7 @@ static void test_RegLoadMUIString(void) ...@@ -3859,7 +3859,7 @@ static void test_RegLoadMUIString(void)
/* 0 */ /* 0 */
{ "", REG_SZ, FALSE, ERROR_INVALID_DATA }, { "", REG_SZ, FALSE, ERROR_INVALID_DATA },
{ "not a MUI string", REG_SZ, FALSE, ERROR_INVALID_DATA }, { "not a MUI string", REG_SZ, FALSE, ERROR_INVALID_DATA },
{ "@unknown.dll", REG_SZ, TRUE, ERROR_INVALID_DATA, 0, TRUE }, { "@unknown.dll", REG_SZ, TRUE, ERROR_INVALID_DATA },
{ "@unknown.dll,-10", REG_SZ, TRUE, ERROR_FILE_NOT_FOUND }, { "@unknown.dll,-10", REG_SZ, TRUE, ERROR_FILE_NOT_FOUND },
/* 4 */ /* 4 */
{ with_env_var, REG_SZ, FALSE, ERROR_SUCCESS }, { with_env_var, REG_SZ, FALSE, ERROR_SUCCESS },
...@@ -3867,7 +3867,7 @@ static void test_RegLoadMUIString(void) ...@@ -3867,7 +3867,7 @@ static void test_RegLoadMUIString(void)
{ "%WineMuiTest1%", REG_EXPAND_SZ, TRUE, ERROR_INVALID_DATA }, { "%WineMuiTest1%", REG_EXPAND_SZ, TRUE, ERROR_INVALID_DATA },
{ "@%WineMuiTest2%", REG_EXPAND_SZ, TRUE, ERROR_SUCCESS }, { "@%WineMuiTest2%", REG_EXPAND_SZ, TRUE, ERROR_SUCCESS },
/* 8 */ /* 8 */
{ "@%WineMuiExe%,a", REG_SZ, FALSE, ERROR_INVALID_DATA, 0, TRUE }, { "@%WineMuiExe%,a", REG_SZ, FALSE, ERROR_INVALID_DATA },
{ "@%WineMuiExe%,-4", REG_SZ, FALSE, ERROR_NOT_FOUND, ERROR_FILE_NOT_FOUND, TRUE }, { "@%WineMuiExe%,-4", REG_SZ, FALSE, ERROR_NOT_FOUND, ERROR_FILE_NOT_FOUND, TRUE },
{ "@%WineMuiExe%,-39", REG_SZ, FALSE, ERROR_RESOURCE_NAME_NOT_FOUND, 0, TRUE }, { "@%WineMuiExe%,-39", REG_SZ, FALSE, ERROR_RESOURCE_NAME_NOT_FOUND, 0, TRUE },
{ "@%WineMuiDat%,-16", REG_EXPAND_SZ, FALSE, ERROR_BAD_EXE_FORMAT, ERROR_FILE_NOT_FOUND, TRUE }, { "@%WineMuiDat%,-16", REG_EXPAND_SZ, FALSE, ERROR_BAD_EXE_FORMAT, ERROR_FILE_NOT_FOUND, TRUE },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment