From c936e0c375cd194197b94cbe775283b1ba6696f8 Mon Sep 17 00:00:00 2001
From: "benjamin.sitbon" <benjamin.sibon@etu.hesge.ch>
Date: Mon, 24 May 2021 17:49:18 +0200
Subject: [PATCH] =?UTF-8?q?bug=20enlev=C3=A9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 display.c | 3 ++-
 wheel.c   | 2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/display.c b/display.c
index d765e23..94371c5 100644
--- a/display.c
+++ b/display.c
@@ -55,8 +55,9 @@ void *display_func(void *param){
 	SDL_Window* window = init_display();
 	// printf("\ndisplay_func");
 	machine* mas = (machine *) (param);
+	
 
-	while(mas->wheels[0].end){
+	while(!*mas->wheels[0].end){
 
 		SDL_RenderCopy(renderer, one_arm_texture, NULL, &one_arm_rect);
 
diff --git a/wheel.c b/wheel.c
index 4b41e0a..92619b2 100644
--- a/wheel.c
+++ b/wheel.c
@@ -19,7 +19,7 @@ void *wheel_func(void *param){
     // printf("\nwheel_func");
     wheel* this = (wheel *) (param);
 
-    while(this->end){
+    while(!*this->end){
       wheel_spin_1_tick(this);
       wait_until(wheel_delay_ms(*this));
     }
-- 
GitLab