Fix well fed message not printing by initializing
authorLukas Jiriste <ljiriste@student.42prague.com>
Thu, 30 May 2024 10:55:13 +0000 (12:55 +0200)
committerLukas Jiriste <ljiriste@student.42prague.com>
Thu, 30 May 2024 10:55:13 +0000 (12:55 +0200)
philo_bonus/main.c

index ef7cae7189fa6bb6a440055fd61830bb569f6f99..2bf9e6527e3d4d34010a117ab5f4eeeb295c8eea 100644 (file)
@@ -6,7 +6,7 @@
 /*   By: ljiriste <marvin@42.fr>                    +#+  +:+       +#+        */
 /*                                                +#+#+#+#+#+   +#+           */
 /*   Created: 2024/03/22 11:19:48 by ljiriste          #+#    #+#             */
-/*   Updated: 2024/05/30 12:46:31 by ljiriste         ###   ########.fr       */
+/*   Updated: 2024/05/30 12:54:56 by ljiriste         ###   ########.fr       */
 /*                                                                            */
 /* ************************************************************************** */
 
@@ -87,6 +87,7 @@ void  wait_for_end(unsigned int philo_count, t_sems *semaphores)
        int                             end;
        t_check                 check_input;
 
+       end = 0;
        check_input.end = &end;
        check_input.philo_count = philo_count;
        check_input.semaphores = semaphores;