1
0
Fork 0
mirror of https://gitlab.com/sortix/sortix.git synced 2023-02-13 20:55:38 -05:00

Fix ls(1) argument parsing.

This commit is contained in:
Jonas 'Sortie' Termansen 2014-02-28 22:52:20 +01:00
parent 10daa40f01
commit 820bafeabf

View file

@ -262,10 +262,10 @@ void help(FILE* fp, const char* argv0)
int main(int argc, char* argv[])
{
const char* argv0 = argv[0];
for ( int i = 0; i < argc; i++ )
for ( int i = 1; i < argc; i++ )
{
const char* arg = argv[i];
if ( arg[0] != '-' || !argv[1] ) { continue; }
if ( arg[0] != '-' || !arg[1] ) { continue; }
argv[i] = NULL;
if ( !strcmp(arg, "--") ) { break; }
if ( arg[1] != '-' )