From 20170d4e43032620774cc729c854daffbc1075ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20Ankarstr=C3=B6m?= Date: Thu, 10 Jan 2019 11:04:40 +0100 Subject: don't add to history on empty input --- repl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/repl.c b/repl.c index 1788fdf..1fcca4a 100644 --- a/repl.c +++ b/repl.c @@ -38,7 +38,7 @@ int main(int argc, char *argv[]) { break; } - add_history(input); + if (input[0] != '\0') add_history(input); int size = strlen(argv[1]) + 1 + strlen(input) + 1; char *command = malloc(size); -- cgit v1.2.3