diff options
| author | Rudy Bousset <rbousset@z2r5p6.le-101.fr> | 2019-11-01 15:20:41 +0100 | 
|---|---|---|
| committer | Rudy Bousset <rbousset@z2r5p6.le-101.fr> | 2019-11-01 15:20:41 +0100 | 
| commit | 9f5b079ed0b2d315eab2c1870f7946d58893f0ca (patch) | |
| tree | e99675d940e97a2e2a9c98f43a4652d536f4a471 /src/main.c | |
| parent | changes (diff) | |
| download | 42-minishell-9f5b079ed0b2d315eab2c1870f7946d58893f0ca.tar.gz 42-minishell-9f5b079ed0b2d315eab2c1870f7946d58893f0ca.tar.bz2 42-minishell-9f5b079ed0b2d315eab2c1870f7946d58893f0ca.tar.xz 42-minishell-9f5b079ed0b2d315eab2c1870f7946d58893f0ca.tar.zst 42-minishell-9f5b079ed0b2d315eab2c1870f7946d58893f0ca.zip  | |
YO PICKED THE WRONG FOOL, HOUSE
Diffstat (limited to '')
| -rw-r--r-- | src/main.c | 8 | 
1 files changed, 6 insertions, 2 deletions
@@ -24,7 +24,6 @@ int  	char c;  	char *arg;  	uint8_t i; -	int ret;  	i = 0;  	arg = NULL; @@ -44,11 +43,16 @@ int  			if (c == '\n')  				break ;  			arg[i] = c; +			if (!ft_strncmp("", arg, 4)) +			{ +				arg = ft_get_last_line(); +				break ; +			}  			i++;  		}  		arg[i] = '\0';  		ft_history(arg); -		ret = ft_process_arg(arg); +		ft_process_arg(arg);  	}  	free(arg);  	arg = NULL;  | 
