From 0b875d62fcd43ba37f1e4ab07ef935561c408dbc Mon Sep 17 00:00:00 2001 From: Jakub Adamski Date: Thu, 10 Jan 2019 13:59:45 +0100 Subject: [PATCH] p --- Microshell/microshell.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Microshell/microshell.c b/Microshell/microshell.c index a1790d5..9ee58ed 100644 --- a/Microshell/microshell.c +++ b/Microshell/microshell.c @@ -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);