only go back one character to include the new line before field

This commit is contained in:
bjt-user 2024-03-03 17:05:08 +01:00
parent f248a1d279
commit 7fc1a17d3b
1 changed files with 1 additions and 1 deletions

View File

@ -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);