From 256bad8203937abbf26c2291d91a00df4328a33f Mon Sep 17 00:00:00 2001 From: WS64 Date: Thu, 3 Jul 2014 19:30:21 +0200 Subject: [PATCH] Made some varaibales local --- frontend/apps/reader/modules/readertoc.lua | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/frontend/apps/reader/modules/readertoc.lua b/frontend/apps/reader/modules/readertoc.lua index edd9c0904..8d7b36a66 100644 --- a/frontend/apps/reader/modules/readertoc.lua +++ b/frontend/apps/reader/modules/readertoc.lua @@ -99,6 +99,8 @@ function ReaderToc:getTocTitleOfCurrentPage() end function ReaderToc:_getChapterPagesLeft(pageno,pages) + local i + local j = 0 if not self.toc then -- build toc when needed. self:fillToc() @@ -109,7 +111,6 @@ function ReaderToc:_getChapterPagesLeft(pageno,pages) return "" end - j=0 if #self.toc > 0 then for i = 1, #self.toc do v = self.toc[i] @@ -131,6 +132,8 @@ function ReaderToc:_getChapterPagesLeft(pageno,pages) end function ReaderToc:_getChapterPagesDone(pageno) + local i + local j = 0 if not self.toc then -- build toc when needed. self:fillToc() @@ -141,7 +144,6 @@ function ReaderToc:_getChapterPagesDone(pageno) return "" end - j=0 if #self.toc > 0 then for i = 1, #self.toc do v = self.toc[i]