git.ucc.asn.au
/
tpg
/
opendispense2.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c8cb15c
)
Fixed non-numeric arguments prefixed by '-' being allowed
author
John Hodge
<
[email protected]
>
Fri, 4 Mar 2011 08:43:22 +0000
(16:43 +0800)
committer
John Hodge
<
[email protected]
>
Fri, 4 Mar 2011 08:43:22 +0000
(16:43 +0800)
src/client/main.c
patch
|
blob
|
history
diff --git
a/src/client/main.c
b/src/client/main.c
index
7d43db7
..
71f58f9
100644
(file)
--- a/
src/client/main.c
+++ b/
src/client/main.c
@@
-273,6
+273,11
@@
int main(int argc, char *argv[])
gbDryRun = 1;
break;
default:
+ if( !isdigit(argv[i][0]) ) {
+ fprintf(stderr, "%s: Unknown switch '%s'\n", argv[0], argv[i]);
+ ShowUsage();
+ return RV_ARGUMENTS;
+ }
if( text_argc + 1 == MAX_TXT_ARGS )
{
fprintf(stderr, "ERROR: Too many arguments\n");
UCC
git Repository :: git.ucc.asn.au