mirror of
https://github.com/leozide/leocad
synced 2024-11-17 07:47:55 +01:00
Fix error messages of command line argument parsers. (#119)
The two error messages about missing arguments access an argument with an incorrect index because at these points in the code the *CurArg is not yet incremented. Also append line breaks to separate the messages from other notices and warnings that could occur.
This commit is contained in:
parent
bc4ba07a42
commit
7d37913b7b
1 changed files with 3 additions and 3 deletions
|
@ -123,13 +123,13 @@ void lcApplication::ParseIntegerArgument(int* CurArg, int argc, char* argv[], in
|
|||
else
|
||||
{
|
||||
*Value = 0;
|
||||
printf("Invalid value specified for the %s argument.", argv[(*CurArg) - 1]);
|
||||
printf("Invalid value specified for the %s argument.\n", argv[(*CurArg) - 1]);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
*Value = 0;
|
||||
printf("Not enough parameters for the %s argument.", argv[(*CurArg) - 1]);
|
||||
printf("Not enough parameters for the %s argument.\n", argv[(*CurArg)]);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -142,7 +142,7 @@ void lcApplication::ParseStringArgument(int* CurArg, int argc, char* argv[], con
|
|||
}
|
||||
else
|
||||
{
|
||||
printf("No path specified after the %s argument.", argv[(*CurArg) - 1]);
|
||||
printf("No path specified after the %s argument.\n", argv[(*CurArg)]);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue