wordsplit: return error for unclosed quotes

This commit is contained in:
Khaïs COLIN 2025-02-17 14:47:45 +01:00
parent 7806043a98
commit 558ddb4096
Signed by: logistic-bot
SSH key fingerprint: SHA256:RlpiqKeXpcPFZZ4y9Ou4xi2M8OhRJovIwDlbCaMsuAo
2 changed files with 23 additions and 2 deletions

View file

@ -6,7 +6,7 @@
/* By: khais <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2025/02/13 17:02:32 by khais #+# #+# */
/* Updated: 2025/02/17 14:20:45 by khais ### ########.fr */
/* Updated: 2025/02/17 14:54:11 by khais ### ########.fr */
/* */
/* ************************************************************************** */
@ -106,5 +106,7 @@ t_wordlist *minishell_wordsplit(char *original)
break ;
idx++;
}
if (quote != '\0')
return (wordlist_destroy(wordlist), NULL);
return (wordlist);
}