aboutsummaryrefslogtreecommitdiff
path: root/helper.c
diff options
context:
space:
mode:
Diffstat (limited to 'helper.c')
-rw-r--r--helper.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/helper.c b/helper.c
index fb16406..cdbd8d1 100644
--- a/helper.c
+++ b/helper.c
@@ -6,7 +6,7 @@
/* By: cacharle <marvin@42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2020/01/11 07:32:20 by cacharle #+# #+# */
-/* Updated: 2020/01/11 10:37:54 by cacharle ### ########.fr */
+/* Updated: 2020/01/11 11:22:15 by cacharle ### ########.fr */
/* */
/* ************************************************************************** */
@@ -20,9 +20,12 @@ t_bool helper_is_player_cell(t_cell cell)
void helper_free_splited(char **splited)
{
+ int i;
+
if (splited == NULL)
return ;
- while (splited != NULL)
- free(*splited++);
+ i = -1;
+ while (splited[++i] != NULL)
+ free(splited[i]);
free(splited);
}