wordsplit: handle single word with spaces before or after

This commit is contained in:
Khaïs COLIN 2025-02-14 13:30:18 +01:00
parent fc985ea046
commit 8defbf4d13
Signed by: logistic-bot
SSH key fingerprint: SHA256:RlpiqKeXpcPFZZ4y9Ou4xi2M8OhRJovIwDlbCaMsuAo
9 changed files with 154 additions and 16 deletions

View file

@ -6,7 +6,7 @@
/* By: khais <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2025/02/13 17:07:01 by khais #+# #+# */
/* Updated: 2025/02/14 13:29:16 by khais ### ########.fr */
/* Updated: 2025/02/14 13:56:45 by khais ### ########.fr */
/* */
/* ************************************************************************** */
@ -37,6 +37,9 @@ t_wordlist *wordlist_create(t_worddesc *word)
*/
void wordlist_destroy(t_wordlist *wordlist)
{
if (wordlist == NULL)
return ;
worddesc_destroy(wordlist->word);
free(wordlist);
}