From 00616a58eaebc8840b73c3745a70e6b5f6fac77d Mon Sep 17 00:00:00 2001 From: Kai Stevenson Date: Mon, 20 Mar 2023 14:17:32 -0700 Subject: changed clear_screen() so that it works properly within a restricted shell --- src/console.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/console.c') diff --git a/src/console.c b/src/console.c index e675ba2..400a7f5 100644 --- a/src/console.c +++ b/src/console.c @@ -93,7 +93,10 @@ vector_t user_input_pos() { return pos; } void clear_screen() { - system("@cls||clear"); + /* clear the screen */ + printf("\033[2J"); + /* move the cursor to the top left */ + printf("\033[0;0H"); } void warn_user(char* message) { clear_screen(); -- cgit v1.3.1