git.ucc.asn.au
/
tpg
/
opendispense2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Client - Fixed edge case where -coke is interpreted as a count of dispenses
[tpg/opendispense2.git]
/
src
/
client
/
main.c
diff --git
a/src/client/main.c
b/src/client/main.c
index
c1883b4
..
708a5d2
100644
(file)
--- a/
src/client/main.c
+++ b/
src/client/main.c
@@
-251,6
+251,8
@@
int main(int argc, char *argv[])
return 0;
case 'c':
return 0;
case 'c':
+ if( i > 2 && strcmp(argv[i-1], "type") == 0 )
+ goto _default;
if( i + 1 >= argc ) {
fprintf(stderr, "%s: -c takes an argument\n", argv[0]);
ShowUsage();
if( i + 1 >= argc ) {
fprintf(stderr, "%s: -c takes an argument\n", argv[0]);
ShowUsage();
@@
-347,7
+349,7
@@
int main(int argc, char *argv[])
return RV_ARGUMENTS;
}
break;
return RV_ARGUMENTS;
}
break;
- default:
+ default:
_default:
// The first argument is not allowed to begin with 'i'
// (catches most bad flags)
if( giTextArgc == 0 ) {
// The first argument is not allowed to begin with 'i'
// (catches most bad flags)
if( giTextArgc == 0 ) {
UCC
git Repository :: git.ucc.asn.au