summaryrefslogtreecommitdiffstats
path: root/src/b_h.c
diff options
context:
space:
mode:
authorJozanLeClerc <bousset.rudy@gmail.com>2020-10-05 16:11:54 +0200
committerJozanLeClerc <bousset.rudy@gmail.com>2020-10-05 16:11:54 +0200
commitffd4838e8fbaafa80945bcbd74c0dea3ae53105b (patch)
treef2e35e4a7a6c219d584ed54b2d0580a9e3f7c934 /src/b_h.c
parentTODO update (diff)
download42-minishell-ffd4838e8fbaafa80945bcbd74c0dea3ae53105b.tar.gz
42-minishell-ffd4838e8fbaafa80945bcbd74c0dea3ae53105b.tar.bz2
42-minishell-ffd4838e8fbaafa80945bcbd74c0dea3ae53105b.tar.xz
42-minishell-ffd4838e8fbaafa80945bcbd74c0dea3ae53105b.tar.zst
42-minishell-ffd4838e8fbaafa80945bcbd74c0dea3ae53105b.zip
Fix
Diffstat (limited to 'src/b_h.c')
-rw-r--r--src/b_h.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/b_h.c b/src/b_h.c
index cf6ad3f..f24d5db 100644
--- a/src/b_h.c
+++ b/src/b_h.c
@@ -36,7 +36,7 @@ static uint64_t b_get_total_hist(t_msh *msh)
ptr++;
}
}
- ptr = msh->curr_hist;
+ ptr = msh->curr_hist_ptr;
while (*ptr != C_NUL)
{
if (*ptr == C_LF)
@@ -81,7 +81,7 @@ static void b_print_history(uint64_t asked, uint64_t total, t_msh *msh)
to_print = (total - asked < 0) ? (0) : (total - asked);
i = b_print_prev_history(asked, total, msh);
- if ((hist = ft_strdup(msh->curr_hist)) == NULL)
+ if ((hist = ft_strdup(msh->curr_hist_ptr)) == NULL)
return ;
tok = ft_strtok(hist, "\n");
while (tok != NULL)