bugfix: use ceil to keep index greater than or equal to 1

pull/69/head
chrox 11 years ago
parent 324e0575d0
commit 598772562d

@ -31,7 +31,7 @@ end
function ReaderFrontLight:onAdjust(arg, ges)
if self.lipc_handle then
local rel_proportion = ges.distance / Screen:getWidth()
local delta_int = self.steps[math.floor(#self.steps*rel_proportion)]
local delta_int = self.steps[math.ceil(#self.steps*rel_proportion)]
local msg = ""
if ges.direction == "north" then
msg = _("Increase front light intensity to ")

Loading…
Cancel
Save