saurabhshri/simple-yet-powerful-srt-subtitle-parser-cpp

Last subtitle is "cloned" in an edge case

Closed this issue · 2 comments

midn1 commented

Consider this subtitle file:

1
00:00:01,000 --> 00:00:01,500
Subtitle one

2
00:00:02,000 --> 00:00:02,500


(Note the two newlines before the EOF)
This causes the parser to clone the last subtitle, which creates an empty third subtitle.

Removing the second newline avoids this issue.

Feel free to send a PR! :)

Thanks for the report, tracking in #8 .