This commit is contained in:
Jakub Adamski 2019-01-10 14:40:17 +01:00
parent 1da31a52c9
commit 75449fc605

View File

@ -36,9 +36,9 @@ int cut(char **argv, char *command){
} }
int main (){ int main (){
char* argv[100];
int ile, i; int ile, i;
while (1){ while (1){
char* argv[100];
char komenda[max], directory[max]; char komenda[max], directory[max];
if (getcwd(directory, sizeof(directory)) == NULL){ if (getcwd(directory, sizeof(directory)) == NULL){
perror("getcwd() error"); perror("getcwd() error");
@ -60,6 +60,7 @@ int main (){
for(i=0; i<ile; i++) for(i=0; i<ile; i++)
free(argv[i]); free(argv[i]);
free(argv);
} }
return 0; return 0;
} }