summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/utils.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/utils.c b/src/utils.c
index 9d131ad..4719add 100644
--- a/src/utils.c
+++ b/src/utils.c
@@ -135,6 +135,7 @@ void fatalbox(const char *errmsg)
return;
strncpy(msg, errmsg, MSGLEN);
+ msg[MSGLEN - 1] = '\0';
errwin =
newwin(WINROW, WINCOL, (row - WINROW) / 2, (col - WINCOL) / 2);
custom_apply_attr(errwin, ATTR_HIGHEST);
@@ -162,6 +163,7 @@ void warnbox(const char *msg)
return;
strncpy(displmsg, msg, MSGLEN);
+ displmsg[MSGLEN - 1] = '\0';
warnwin =
newwin(WINROW, WINCOL, (row - WINROW) / 2, (col - WINCOL) / 2);
custom_apply_attr(warnwin, ATTR_HIGHEST);