summaryrefslogtreecommitdiffstats
path: root/src/p_lblock_next.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/p_lblock_next.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/p_lblock_next.c b/src/p_lblock_next.c
index 02ecbb2..b319229 100644
--- a/src/p_lblock_next.c
+++ b/src/p_lblock_next.c
@@ -56,15 +56,15 @@ static void
ptr = word;
varlen = i + 1;
while (ptr[varlen] != C_NUL &&
- ft_ischarset("$=\\/@%^*+{}[]<>,.-", ptr[varlen]) == FALSE &&
+ ft_ischarset("$=\\/@%^*+{}[]<>(),.-", ptr[varlen]) == FALSE &&
ft_iswhitespace(ptr[varlen]) == FALSE)
varlen += 1;
ft_strlcpy(tmp, ptr + i, varlen + 1 - i);
u_get_var_value(varval, tmp, ARG_MAX, msh);
p_double_them_bs(varval);
- ft_strlcpy(ptr + (i + ft_strlen(varval)),
+ (void)ft_memmove(ptr + (i + ft_strlen(varval)),
ptr + varlen,
- ft_strlen(ptr + varlen) + 1);
+ (ft_strlen(ptr + varlen) + 1) * sizeof(char));
(void)ft_memmove(word + i, varval, ft_strlen(varval) * sizeof(char));
*(p) = word + (i + ft_strlen(varval) - 1);
}
@@ -223,7 +223,7 @@ static void
p_register_word(char word[], t_msh *msh)
{
char name[255];
- char val[255];
+ char val[ARG_MAX];
char *ptr;
size_t i;