Correct parsing of /i argument.

This commit is contained in:
Kevin Koltzau 2004-08-30 18:39:44 +00:00 committed by Alexandre Julliard
parent 335983ed91
commit d660a6340f
1 changed files with 11 additions and 6 deletions

View File

@ -209,14 +209,19 @@ int main(int argc, char *argv[])
{
WINE_TRACE("argv[%d] = %s\n", i, argv[i]);
if(!strcasecmp(argv[i], "/i"))
if(!strncasecmp(argv[i], "/i", 2))
{
char *argvi = argv[i];
FunctionInstall = TRUE;
i++;
if(i >= argc)
ShowUsage(1);
WINE_TRACE("argv[%d] = %s\n", i, argv[i]);
GotProductCode = GetProductCode(argv[i], &PackageName, &ProductCode);
if(strlen(argvi) > 2)
argvi += 2;
else {
i++;
if(i >= argc)
ShowUsage(1);
WINE_TRACE("argv[%d] = %s\n", i, argv[i]);
}
GotProductCode = GetProductCode(argvi, &PackageName, &ProductCode);
}
else if(!strcasecmp(argv[i], "/a"))
{