Browse Source

[mod] history: remove memory free as it make crash when moving on history.

Moul 3 years ago
parent
commit
b9cdf2c83d
2 changed files with 0 additions and 5 deletions
  1. 0 4
      src/history.c
  2. 0 1
      src/history_tools.c

+ 0 - 4
src/history.c

@@ -45,11 +45,7 @@ void	move_history(t_e *e, int side)
 	move_on_history(e, side);
 	display_history(e, side);
 	if (side == UP || e->hist->yng != NULL)
-	{
-		if (ft_strcmp(e->cmd, e->hist->cmd) != 0)
-			ft_strdel(&e->cmd);
 		e->cmd = e->hist->cmd;
-	}
 	e->pos = ft_strlen(e->cmd);
 }
 

+ 0 - 1
src/history_tools.c

@@ -26,7 +26,6 @@ void	display_history(t_e *e, int side)
 	if (side == DOWN && e->first == 1)
 	{
 		print_history("");
-		ft_strdel(&e->cmd);
 		e->cmd = ft_strnew(0);
 	}
 	else