From be3ffbdc69f667f13ebd15e50c1c3e825b6e4cc7 Mon Sep 17 00:00:00 2001
From: deuce <>
Date: Wed, 16 Feb 2005 21:58:46 +0000
Subject: [PATCH] Allow an offset of 0 for next/previous search.

---
 web/lib/msgslib.ssjs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/web/lib/msgslib.ssjs b/web/lib/msgslib.ssjs
index d8d6b50e8b..ba97c14024 100644
--- a/web/lib/msgslib.ssjs
+++ b/web/lib/msgslib.ssjs
@@ -88,7 +88,7 @@ function find_np_message(offset,next)
 
 	if(!next)
 		step=1;
-	for(last_offset=parseInt(offset)+step;last_offset>0 && (idx=msgbase.get_msg_index(true,last_offset))!=null;last_offset+=step) {
+	for(last_offset=parseInt(offset)+step;last_offset>=0 && (idx=msgbase.get_msg_index(true,last_offset))!=null;last_offset+=step) {
 		if(idx.attr&MSG_DELETE)
 			continue;
 		if(idx.attr&MSG_PRIVATE && !idx_to_user(idx))
-- 
GitLab