commit fbff968b27df9f6f41c5f32aef29a85f6e4d3da0
parent e4192c61551919801d710567ae1cfd0685250f3c
Author: qorg11 <qorg@vxempire.xyz>
Date: Sat, 5 Dec 2020 15:34:18 +0100
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
Diffstat:
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/src/wc.c b/src/wc.c
@@ -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"));