From cc4f2584edb66eb359c2cc1035f12caf187d9f30 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Valentin=20Mogu=C3=A9rou?= Date: Wed, 27 Oct 2021 22:25:07 +0200 Subject: [PATCH] =?UTF-8?q?Correction=20d'erreurs=20d'=C3=A9tourderie?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Dans les commandes de la fonction interact() dans le for(;;), les commandes des STR_STARTS_WITH doivent correspondre à leurs homologues plus bas dans les if. --- src/interact.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/interact.c b/src/interact.c index 1271278..44f7cca 100644 --- a/src/interact.c +++ b/src/interact.c @@ -175,7 +175,7 @@ void interact(int width) { pop_back(gd->player_route); } - strcpy(buffer, prompt+strlen("z")); + strcpy(buffer, prompt+strlen("undo")); ltrim(prompt, buffer); } else if STR_STARTS_WITH(prompt, "left") @@ -264,7 +264,7 @@ void interact(int width) { pop_back(gd->player_route); } - strcpy(buffer, prompt+strlen("undo")); + strcpy(buffer, prompt+strlen("d")); ltrim(prompt, buffer); } else if STR_STARTS_WITH(prompt, "z") @@ -274,7 +274,7 @@ void interact(int width) case 1: puts("Cannot move: border of the grid"); break; case 2: puts("Cannot move: already went there"); break; } - strcpy(buffer, prompt+strlen("d")); + strcpy(buffer, prompt+strlen("z")); ltrim(prompt, buffer); } else