Index: nselib/httpspider.lua =================================================================== --- nselib/httpspider.lua (revision 32854) +++ nselib/httpspider.lua (working copy) @@ -769,6 +769,7 @@ -- pages we have retrieved so far local count = self:getPageCount() if ( self.options.maxpagecount and + ( self.options.maxpagecount > 0 ) and ( count > self.options.maxpagecount ) ) then table.insert(response_queue, { false, { err = false, msg = "Reached max page count" } }) condvar "signal"