Should be using strlen instead of sizeof.

modified:   src/nmstermio.c
This commit is contained in:
Brian Barto 2018-08-05 20:05:19 -04:00
parent 56df5f3de5
commit 1c8f8808d9

View File

@ -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));