summaryrefslogtreecommitdiffstats
path: root/src/p_args_next.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/p_args_next.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/src/p_args_next.c b/src/p_args_next.c
index 36f6bf1..10ca37f 100644
--- a/src/p_args_next.c
+++ b/src/p_args_next.c
@@ -27,10 +27,9 @@ static size_t
end++;
if (word[end] == c && c == C_DQUOTE)
{
- if (word[end - 1] == C_BACKSLASH)
+ if (word[end - 1] == C_BACKSLASH && word[end - 2] != C_BACKSLASH)
{
- if (word[end - 2] != C_BACKSLASH)
- end++;
+ end++;
}
}
}
@@ -57,7 +56,16 @@ static size_t
else if (word[end] == C_SQUOTE || word[end] == C_DQUOTE)
{
while (word[end] != C_NULL && ft_iswhitespace(word[end]) == FALSE)
- end = p_skip_delim_size(word, word[end], end);
+ {
+ if (word[end] == C_SQUOTE || word[end] == C_DQUOTE)
+ end = p_skip_delim_size(word, word[end], end);
+ else
+ {
+ while (word[end] != C_NULL &&
+ ft_iswhitespace(word[end]) == FALSE)
+ end++;
+ }
+ }
}
return (end);
}