Skip to content

Commit

Permalink
lower band check as well
Browse files Browse the repository at this point in the history
  • Loading branch information
SamSaffron committed Sep 22, 2014
1 parent 8c74255 commit f625500
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/controllers/topics_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def show
end

page = params[:page].to_i
if (page - 1) * SiteSetting.posts_per_page > @topic_view.topic.highest_post_number
if (page < 0) || ((page - 1) * SiteSetting.posts_per_page > @topic_view.topic.highest_post_number)
raise Discourse::NotFound
end

Expand Down

0 comments on commit f625500

Please sign in to comment.