=== DB.lua ================================================================== --- DB.lua (revision 19679) +++ DB.lua (local) @@ -235,7 +235,11 @@ -- load last chunk local lastKey = math.modf(self.last_chunk.count / BLOCK_SIZE) if not self.store[lastKey] then - return lastKey * BLOCK_SIZE, BLOCK_SIZE + if lastKey * BLOCK_SIZE != self.last_chunk.count then + return lastKey * BLOCK_SIZE, BLOCK_SIZE + else + return lastKey * BLOCK_SIZE - 1, BLOCK_SIZE + end end -- otherwise load in the direction of scrolling