wait i'm fucking stupid, lmao, well musl, good luck searching for a file called -<CHAR>, but if it makes you happy, go for it my dude

This commit is contained in:
qorg11 2020-12-05 15:34:18 +01:00
parent e4192c6155
commit fbff968b27
No known key found for this signature in database
GPG Key ID: 343FC20A4ACA62B9
1 changed files with 7 additions and 7 deletions

View File

@ -71,15 +71,15 @@ main(int argc, char *argv[])
switch(c)
{
case 'l':
show_lines = 0;
break;
show_lines = 0;
break;
case 'w':
show_words = 0;
break;
show_words = 0;
break;
case 'c':
case 'm':
show_bytes = 0;
break;
show_bytes = 0;
break;
}
}
@ -91,7 +91,7 @@ main(int argc, char *argv[])
}
else for(int i = optind; i<argc; i++)
{
if(argv[i][0] == '-' && argv[i][1] == '\0')
if(argv[i][0] == '-')
data = wc(stdin);
else
data = wc(fopen(argv[i],"r"));