From 26e93c2f04209c3242e0458c549a7b4041cad600 Mon Sep 17 00:00:00 2001 From: Jean Sirmai Date: Wed, 21 Jul 2021 20:58:14 +0200 Subject: [PATCH] touche suppr essai 2 --- src/cli.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/cli.c b/src/cli.c index cf9d149..cc39cac 100644 --- a/src/cli.c +++ b/src/cli.c @@ -360,7 +360,7 @@ void connectedCommandLine(int sockfd) break; // Delete next char - sendBuff[++curPosition] = 0; + sendBuff[curPosition] = 0; curLineLength--; if (curLineLength >= 0) { @@ -379,7 +379,10 @@ void connectedCommandLine(int sockfd) ); printf("%s", C_RESTORE_CURSORPOS); - printf("%s", C_CURSORRIGHT); + // printf("%s", C_CURSORRIGHT); + } + else { + printf("%s", C_CURSORRIGHT); // pas sûr que ce soit utile... } } break;