This commit is contained in:
Jakub Adamski 2019-01-10 13:59:45 +01:00
parent 1c84005dc8
commit 0b875d62fc
1 changed files with 3 additions and 2 deletions

View File

@ -43,8 +43,9 @@ int main (){
printf("[%s]$ ", directory);
fgets(komenda, max, stdin);
cut(argv, komenda);
if (!strcmp(argv[0], "exit"))
if (argv[0]==NULL)
continue;
else if (!strcmp(argv[0], "exit"))
break;
else
execvp(argv[0], argv);