From 6c5c324946c1e289de9521bff718f26e47b47362 Mon Sep 17 00:00:00 2001
From: zephyrus <zephyrus@54d463be-8e91-2dee-dedb-b68131a5f0ec>
Date: Thu, 29 May 2008 11:46:36 +0000
Subject: - Fixed bug report 1436 (Auction)

git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12742 54d463be-8e91-2dee-dedb-b68131a5f0ec
---
 src/char_sql/int_auction.c | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

(limited to 'src')

diff --git a/src/char_sql/int_auction.c b/src/char_sql/int_auction.c
index ebfce7b6f..a1476cb4c 100644
--- a/src/char_sql/int_auction.c
+++ b/src/char_sql/int_auction.c
@@ -276,11 +276,17 @@ static void mapif_parse_Auction_requestlist(int fd)
 			continue;
 
 		i++;
-		if( i > 5 ) { pages++; i = 0; }
-		if( page != pages ) continue;
+		if( i > 5 )
+		{ // Counting Pages of Total Results (5 Results per Page)
+			pages++;
+			i = 1; // First Result of This Page
+		}
+
+		if( page != pages )
+			continue; // This is not the requested Page
 
 		memcpy(WBUFP(buf, j * len), auction, len);
-		j++;
+		j++; // Found Results
 	}
 	iter->destroy(iter);
 
-- 
cgit v1.2.3-70-g09d2