From 7fc1a17d3b36cf995d35b63f3728ef516caf4830 Mon Sep 17 00:00:00 2001 From: bjt-user Date: Sun, 3 Mar 2024 17:05:08 +0100 Subject: [PATCH] only go back one character to include the new line before field --- src/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.c b/src/main.c index 697f2a6..31dc144 100644 --- a/src/main.c +++ b/src/main.c @@ -40,7 +40,7 @@ int main(int argc, char **argv) { while(read_until_nl(myfd, my_event)) { if (strncmp(my_event, "BEGIN:VEVENT", 12) == 0) { // include the BEGIN:EVENT to not loose the new line of first field - lseek(myfd, -12, SEEK_CUR); + lseek(myfd, -1, SEEK_CUR); memset(my_event, '\0', sizeof(my_event)); read_until_string(myfd, my_event, "END:VEVENT"); unfolding_string(my_event, unfolded_event);