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

A single header simple, powerful and full blown srt subtitle parser written in C++.
Other
51 stars 15 forks source link

Last subtitle is "cloned" in an edge case #7

Closed midn1 closed 5 years ago

midn1 commented 6 years ago

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.

saurabhshri commented 6 years ago

Feel free to send a PR! :)

saurabhshri commented 5 years ago

Thanks for the report, tracking in #8 .