commit 9d8a71a4405cf9e7e3bae38dbac20c5f2d83b27d
parent 97b50cc235590672db96338ca8d4367137d39895
Author: Andreas Gruhler <agruhl@gmx.ch>
Date: Sun, 19 Jun 2022 23:58:51 +0200
fix wrong n in scanf
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/diary.c b/src/diary.c
@@ -314,7 +314,7 @@ bool read_config(const char* file_path) {
// ignore comment lines
if (*line == '#' || *line == ';') continue;
- if (sscanf(line, "%256s = %256s", key_buf, value_buf) == 2) {
+ if (sscanf(line, "%79s = %79s", key_buf, value_buf) == 2) {
if (strcmp("dir", key_buf) == 0) {
expaned_value = expand_path(value_buf);
CONFIG.dir = (char *) malloc(strlen(expaned_value) + 1 * sizeof(char));