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

field and is valid

svn path=/trunk/; revision=17388
This commit is contained in:
Gé van Geldorp 2005-08-14 20:22:37 +00:00
parent 7d093589b4
commit 33904bcc83

View file

@ -1714,7 +1714,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;
@ -1773,7 +1773,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;
@ -1822,7 +1822,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;