From 33904bcc83195267f8a180bf56bdff92dc10225f Mon Sep 17 00:00:00 2001 From: =?utf8?q?G=C3=A9=20van=20Geldorp?= Date: Sun, 14 Aug 2005 20:22:37 +0000 Subject: [PATCH] index is 1-based at this point, index == line->nb_fields is the last field and is valid svn path=/trunk/; revision=17388 --- reactos/lib/setupapi/parser.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/reactos/lib/setupapi/parser.c b/reactos/lib/setupapi/parser.c index cc824df488f..e14e7fb479d 100644 --- a/reactos/lib/setupapi/parser.c +++ b/reactos/lib/setupapi/parser.c @@ -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; -- 2.17.1