TypesettingTools / SubInspector

Low-level subtitle inspection library.
MIT License
5 stars 3 forks source link

fix defaultTimes in non-exhaustive mode #12

Closed line0 closed 9 years ago

line0 commented 9 years ago

The frameTime was only ever being set in exhaustive mode, otherwise it's nil and the start time never gets added to the times table. Fixed by getting rid of the conditional block and limiting the loop instead (also gets rid of some duplication)

torque commented 9 years ago

Looks fine. I'm not wild about putting the conditional directly in the for loop parameter, but it's not like this code is anywhere near pretty, so if it works, it works.