From 9a2b138a03e27d0f04101fe6ae3977d79518c513 Mon Sep 17 00:00:00 2001 From: Albert Cervin Date: Mon, 23 Jan 2023 23:56:38 +0100 Subject: Add more tests and documentation Both doxygen and man page --- src/minibuffer.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src/minibuffer.c') diff --git a/src/minibuffer.c b/src/minibuffer.c index a424af8..cf09e73 100644 --- a/src/minibuffer.c +++ b/src/minibuffer.c @@ -31,6 +31,7 @@ int32_t execute(struct command_ctx ctx, int argc, const char *argv[]) { struct text_chunk line = buffer_get_line(g_minibuffer.buffer, 0); char *l = (char *)malloc(line.nbytes + 1); memcpy(l, line.text, line.nbytes); + l[line.nbytes] = '\0'; // split on ' ' const char *argv[128] = {l}; -- cgit v1.2.3