summaryrefslogtreecommitdiff
path: root/shed.c
diff options
context:
space:
mode:
Diffstat (limited to 'shed.c')
-rw-r--r--shed.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/shed.c b/shed.c
index a0cc554..c010cb1 100644
--- a/shed.c
+++ b/shed.c
@@ -60,6 +60,9 @@ struct shed *shed(struct shed *e)
}
} while (e->handle(e, &tio, c));
+ /* TODO: make sure this doesn't overflow */
+ e->cur->buf[e->cur->nread] = '\0';
+
tcsetattr(STDIN_FILENO, TCSADRAIN, &original_tio);
return e;
}