Commit: ccd8273b238c0eb88cf91414a83f29bfdcee8b2f
Parent: cb54d73e6ac1ab39ceff4715784f86c15f26f542
Author: Ren Tatsumoto
Date: Mon, 9 Nov 2020 23:42:56 +0300
explicitly return -1 to indicate bad timing
Diffstat:
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/subs2srs.lua b/subs2srs.lua
@@ -848,7 +848,7 @@ subs.get_timing = function(position)
local i = position == 'start' and 1 or #subs.list
return subs.list[i][position]
end
- return nil
+ return -1
end
subs.get_text = function()
@@ -870,7 +870,7 @@ subs.get = function()
['start'] = subs.get_timing('start'),
['end'] = subs.get_timing('end'),
}
- if not sub['start'] or not sub['end'] then
+ if sub['start'] < 0 or sub['end'] < 0 then
return nil
end
if sub['start'] == sub['end'] then