fix expanding

This commit is contained in:
Quinten Mennen 2025-02-27 13:06:44 +01:00
parent 11b19749f0
commit 3b1ad5500b

View File

@ -40,9 +40,9 @@ char *expander_parse_string(char *s, t_minishell *msh)
current = variables;
i = 0;
j = 0;
while (s[i] && current)
while (s[i])
{
if (s[i] == '$' && s[i + 1])
if (s[i] == '$' && s[i + 1] && current)
{
i++;
i += expander_expand_dollar(s + i, string, &j, current);