From 947abb3c01b82507b94a7e7eef7e7d8c89a8eba7 Mon Sep 17 00:00:00 2001 From: onyx-and-iris Date: Thu, 27 Jun 2024 23:07:29 +0100 Subject: [PATCH] clear the input buffer before reading from stdin again --- src/vmrcli.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/vmrcli.c b/src/vmrcli.c index 599da9b..51ded57 100644 --- a/src/vmrcli.c +++ b/src/vmrcli.c @@ -205,7 +205,8 @@ void interactive(T_VBVMR_INTERFACE *vmr) memset(command, '\0', sizeof(command)); } - p = input; /* reset pointer */ + p = input; /* reset pointer */ + memset(input, '\0', sizeof(input)); /* reset input buffer */ printf(">> "); } }