Properly NUL-terminate the day heading after editing

Signed-off-by: Lukas Fleischer <lfleischer@calcurse.org>
This commit is contained in:
Lukas Fleischer 2018-05-26 11:47:01 +02:00
parent 7e5f8ed7bc
commit 8abb1a93ad

View File

@ -789,7 +789,7 @@ static void general_option_edit(int i)
buf[BUFSIZ - 1] = '\0';
if (updatestring(win[STA].p, &buf, 0, 1) == 0) {
strncpy(conf.day_heading, buf, BUFSIZ);
conf.output_datefmt[BUFSIZ - 1] = '\0';
conf.day_heading[BUFSIZ - 1] = '\0';
}
break;
}