mirror of
https://github.com/koreader/koreader.git
synced 2025-08-10 00:52:38 +00:00
[plugin] Fix crash in AutoWarmth (#9411)
Fixes the crash mentioned in https://github.com/koreader/koreader/issues/9409#issuecomment-1207484444?
This commit is contained in:
@@ -307,7 +307,7 @@ function AutoWarmth:scheduleNextWarmthChange(time_s, search_pos, from_resume)
|
||||
if self.sched_times_s[i] <= time_s then
|
||||
actual_warmth = self.sched_warmths[i] or actual_warmth
|
||||
local j = i
|
||||
while self.sched_times_s[j] <= time_s + delay_s do
|
||||
while j <= #self.sched_warmths and self.sched_times_s[j] <= time_s + delay_s do
|
||||
-- Most times only one iteration through this loop
|
||||
next_warmth = self.sched_warmths[j] or next_warmth
|
||||
j = j + 1
|
||||
|
||||
Reference in New Issue
Block a user