summaryrefslogtreecommitdiff
path: root/src/minibuffer.c
diff options
context:
space:
mode:
authorAlbert Cervin <albert@acervin.com>2023-01-23 23:56:38 +0100
committerAlbert Cervin <albert@acervin.com>2023-01-23 23:56:38 +0100
commit9a2b138a03e27d0f04101fe6ae3977d79518c513 (patch)
tree113fe14c15e93872e0fe8b6d7a4e56ed3398b375 /src/minibuffer.c
parent9eda570311ffd292d333f7687074403ff46cc838 (diff)
downloaddged-9a2b138a03e27d0f04101fe6ae3977d79518c513.tar.gz
dged-9a2b138a03e27d0f04101fe6ae3977d79518c513.tar.xz
dged-9a2b138a03e27d0f04101fe6ae3977d79518c513.zip
Add more tests and documentation
Both doxygen and man page
Diffstat (limited to 'src/minibuffer.c')
-rw-r--r--src/minibuffer.c1
1 files changed, 1 insertions, 0 deletions
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};