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:
parent
10daa40f01
commit
820bafeabf
1 changed files with 2 additions and 2 deletions
|
@ -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] != '-' )
|
||||
|
|
Loading…
Reference in a new issue