Skip to content

Node.js based forum software built for the modern web

one more time

barisusakli518d73156297
diff --git a/src/controllers/topics.js b/src/controllers/topics.js
index 6e72f3a446..8cbde07192 100644
--- a/src/controllers/topics.js
+++ b/src/controllers/topics.js
@@ -62,7 +62,7 @@ topicsController.get = function(req, res, next) {
}
var postIndex = 0;
- req.params.post_index = req.params.post_index || 0;
+ req.params.post_index = parseInt(req.params.post_index, 10) || 0;
if (!settings.usePagination) {
if (reverse) {
if (parseInt(req.params.post_index, 10) === 1) {