diff options
-rw-r--r-- | urigetline.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/urigetline.c b/urigetline.c index 92b4de7..2de0126 100644 --- a/urigetline.c +++ b/urigetline.c @@ -77,10 +77,10 @@ int main(int argc,char *argv[]) {//argument needs to be the URI a=line; matches=1; for(;a;) { + if(!*a) break; rule=MATCH_PATTERN; j=0; switch(a[0]) { - case 0: j=1; goto match; break; case '-': j=1; rule=MATCH_PATTERN; break; case 'n': j=1; rule=MATCH_UNEXIST; break; case 'r': j=1; rule=MATCH_REVERSE; break; @@ -121,7 +121,6 @@ int main(int argc,char *argv[]) {//argument needs to be the URI a=c; } if(matches) { -match: //printf("comm: %s\n",command); printf("%s\n",command); if(!all) return ret;//bail early if we only need first match |