index is 1-based at this point, index == line->nb_fields is the last

field and is valid.
This commit is contained in:
Ge van Geldorp 2005-08-15 09:43:28 +00:00 committed by Alexandre Julliard
parent 074d9e4caf
commit 3ebeb2377f
1 changed files with 3 additions and 3 deletions

View File

@ -1700,7 +1700,7 @@ BOOL WINAPI SetupGetBinaryField( PINFCONTEXT context, DWORD index, BYTE *buffer,
SetLastError( ERROR_LINE_NOT_FOUND );
return FALSE;
}
if (!index || index >= line->nb_fields)
if (!index || index > line->nb_fields)
{
SetLastError( ERROR_INVALID_PARAMETER );
return FALSE;
@ -1759,7 +1759,7 @@ BOOL WINAPI SetupGetMultiSzFieldA( PINFCONTEXT context, DWORD index, PSTR buffer
SetLastError( ERROR_LINE_NOT_FOUND );
return FALSE;
}
if (!index || index >= line->nb_fields)
if (!index || index > line->nb_fields)
{
SetLastError( ERROR_INVALID_PARAMETER );
return FALSE;
@ -1808,7 +1808,7 @@ BOOL WINAPI SetupGetMultiSzFieldW( PINFCONTEXT context, DWORD index, PWSTR buffe
SetLastError( ERROR_LINE_NOT_FOUND );
return FALSE;
}
if (!index || index >= line->nb_fields)
if (!index || index > line->nb_fields)
{
SetLastError( ERROR_INVALID_PARAMETER );
return FALSE;