From 1c8f8808d961b993410f8f98e47433f5dc5c8309 Mon Sep 17 00:00:00 2001 From: Brian Barto Date: Sun, 5 Aug 2018 20:05:19 -0400 Subject: [PATCH] Should be using strlen instead of sizeof. modified: src/nmstermio.c --- src/nmstermio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/nmstermio.c b/src/nmstermio.c index b752bc1..bdf3397 100644 --- a/src/nmstermio.c +++ b/src/nmstermio.c @@ -264,7 +264,7 @@ int nmstermio_get_cursor_row(void) { memset(buf, 0, sizeof(buf)); - write(STDOUT_FILENO, cmd, sizeof(cmd)); + write(STDOUT_FILENO, cmd, strlen(cmd)); r = read(STDIN_FILENO, buf, sizeof(buf));