Skip to content

Commit edbe893

Browse files
🐛 fix: Fix a invalid readn and free
1 parent 9296531 commit edbe893

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

bonus/src/10-Parser/Parse_Sphere_Bonus.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
/* By: cnatanae <cnatanae@student.42sp.org.br> +#+ +:+ +#+ */
77
/* +#+#+#+#+#+ +#+ */
88
/* Created: 2025/01/30 14:38:49 by tmalheir #+# #+# */
9-
/* Updated: 2025/02/10 07:45:13 by cnatanae ### ########.fr */
9+
/* Updated: 2025/02/10 11:55:04 by cnatanae ### ########.fr */
1010
/* */
1111
/* ************************************************************************** */
1212

@@ -65,6 +65,6 @@ bool parse_sphere(char *line, t_world *world)
6565
set_sphere(&sp, info[2], norm_col, pos);
6666
insert_into_obj_list(&world->obj_lst, sp);
6767
if (!sphere_patterns_validation(info, world, sp))
68-
return (true_or_false(info, false));
68+
return (false);
6969
return (true_or_false(info, true));
7070
}

src/10-Parser/Parse_Sphere.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
/* By: cnatanae <cnatanae@student.42sp.org.br> +#+ +:+ +#+ */
77
/* +#+#+#+#+#+ +#+ */
88
/* Created: 2025/01/30 14:38:49 by tmalheir #+# #+# */
9-
/* Updated: 2025/02/10 07:18:15 by cnatanae ### ########.fr */
9+
/* Updated: 2025/02/10 11:55:27 by cnatanae ### ########.fr */
1010
/* */
1111
/* ************************************************************************** */
1212

@@ -65,6 +65,6 @@ bool parse_sphere(char *line, t_world *world)
6565
set_sphere(&sp, info[2], norm_col, pos);
6666
insert_into_obj_list(&world->obj_lst, sp);
6767
if (!sphere_patterns_validation(info, world, sp))
68-
return (true_or_false(info, false));
68+
return (false);
6969
return (true_or_false(info, true));
7070
}

0 commit comments

Comments
 (0)