advapi32: Fix the error code on parse failure.
Signed-off-by: Akihiro Sagawa <sagawa.aki@gmail.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
e798d25f25
commit
cb555215a9
|
@ -3273,7 +3273,7 @@ LSTATUS WINAPI RegLoadMUIStringW(HKEY hKey, LPCWSTR pwszValue, LPWSTR pwszBuffer
|
|||
|
||||
/* Format of the expanded value is 'path_to_dll,-resId' */
|
||||
if (!pComma || pComma[1] != '-') {
|
||||
result = ERROR_BADKEY;
|
||||
result = ERROR_INVALID_DATA;
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
|
|
|
@ -3859,7 +3859,7 @@ static void test_RegLoadMUIString(void)
|
|||
/* 0 */
|
||||
{ "", 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 },
|
||||
/* 4 */
|
||||
{ with_env_var, REG_SZ, FALSE, ERROR_SUCCESS },
|
||||
|
@ -3867,7 +3867,7 @@ static void test_RegLoadMUIString(void)
|
|||
{ "%WineMuiTest1%", REG_EXPAND_SZ, TRUE, ERROR_INVALID_DATA },
|
||||
{ "@%WineMuiTest2%", REG_EXPAND_SZ, TRUE, ERROR_SUCCESS },
|
||||
/* 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%,-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 },
|
||||
|
|
Loading…
Reference in New Issue