From 8020f1fa6fd5785537810d959027b82436c2b698 Mon Sep 17 00:00:00 2001 From: nishi Date: Mon, 29 Jan 2024 23:18:10 +0000 Subject: [PATCH] fixing the clear_console git-svn-id: file:///raid/svn-main/nishi-libw3/trunk@134 d27a3e52-49c5-7645-884c-6793ebffc270 --- Example/w3b/w3b.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Example/w3b/w3b.c b/Example/w3b/w3b.c index 83edee2..e8e320b 100644 --- a/Example/w3b/w3b.c +++ b/Example/w3b/w3b.c @@ -32,10 +32,10 @@ extern int strcasecmp(const char* s1, const char* s2); void clear_console() { #ifdef __MINGW32__ DWORD written = 0; - const char* seq = "\x1b[2J\x1b[1;1H"; + const char* seq = "\x1b[m\x1b[2J\x1b[1;1H"; WriteConsole(winstdout, seq, strlen(seq), &written, NULL); #else - printf("\x1b[2J\x1b[1;1H"); + printf("\x1b[m\x1b[2J\x1b[1;1H"); fflush(stdout); #endif } -- 2.43.0