From e7ea31eb213915c7db06ddf1435dddb77d128add Mon Sep 17 00:00:00 2001 From: onyx-and-iris Date: Tue, 25 Jun 2024 17:08:31 +0100 Subject: [PATCH] check length of string for 'Q' --- src/vmrcli.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/vmrcli.c b/src/vmrcli.c index 9ad510d..e81710c 100644 --- a/src/vmrcli.c +++ b/src/vmrcli.c @@ -124,7 +124,7 @@ void interactive(T_VBVMR_INTERFACE *vmr) while (fgets(input, MAX_LINE, stdin) != NULL) { - if (strncmp(input, "Q", 1) == 0 || strncmp(input, "q", 1) == 0) + if (strlen(input) == 2 && (strncmp(input, "Q", 1) == 0 || strncmp(input, "q", 1) == 0)) break; set_parameters(vmr, input);