projects
/
platform
/
upstream
/
freerdp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1dbd2d2
)
Command line ignore empty if flag set
author
Armin Novak
<armin.novak@thincast.com>
Mon, 12 Jun 2017 10:23:10 +0000
(12:23 +0200)
committer
Armin Novak
<armin.novak@thincast.com>
Mon, 12 Jun 2017 10:23:10 +0000
(12:23 +0200)
When CommandLineParseArgumentsA is called with flag
COMMAND_LINE_IGN_UNKNOWN_KEYWORD return success if the
command line is empty.
winpr/libwinpr/utils/cmdline.c
patch
|
blob
|
history
diff --git
a/winpr/libwinpr/utils/cmdline.c
b/winpr/libwinpr/utils/cmdline.c
index
19e4eab
..
0493056
100644
(file)
--- a/
winpr/libwinpr/utils/cmdline.c
+++ b/
winpr/libwinpr/utils/cmdline.c
@@
-85,7
+85,10
@@
int CommandLineParseArgumentsA(int argc, LPCSTR* argv, COMMAND_LINE_ARGUMENT_A*
if (argc == 1)
{
- status = COMMAND_LINE_STATUS_PRINT_HELP;
+ if (flags & COMMAND_LINE_IGN_UNKNOWN_KEYWORD)
+ status = 0;
+ else
+ status = COMMAND_LINE_STATUS_PRINT_HELP;
return status;
}