setupapi: Always fill output parameters in SetupCopyOEMInfA().

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Zebediah Figura 2019-05-23 18:00:47 -05:00 committed by Alexandre Julliard
parent 29f65bc6a2
commit 56aab6aaf8
2 changed files with 3 additions and 10 deletions

View File

@ -851,12 +851,9 @@ BOOL WINAPI SetupCopyOEMInfA( PCSTR source, PCSTR location,
if (source && !(sourceW = strdupAtoW( source ))) goto done;
if (location && !(locationW = strdupAtoW( location ))) goto done;
if (!(ret = SetupCopyOEMInfW( sourceW, locationW, media_type, style, destW,
buffer_size, &size, NULL )))
{
ret = SetupCopyOEMInfW( sourceW, locationW, media_type, style, destW, buffer_size, &size, NULL );
if (required_size) *required_size = size;
goto done;
}
if (dest)
{
@ -866,10 +863,7 @@ BOOL WINAPI SetupCopyOEMInfA( PCSTR source, PCSTR location,
if (component) *component = strrchr( dest, '\\' ) + 1;
}
else
{
SetLastError( ERROR_INSUFFICIENT_BUFFER );
goto done;
}
}
done:

View File

@ -246,7 +246,6 @@ static void test_SetupCopyOEMInf(void)
ok(res == FALSE, "Expected FALSE, got %d\n", res);
ok(GetLastError() == ERROR_FILE_EXISTS,
"Expected ERROR_FILE_EXISTS, got %d\n", GetLastError());
todo_wine
ok(!strcmp(orig_dest, dest), "Expected '%s', got '%s'.\n", orig_dest, dest);
SetLastError(0xdeadbeef);