From 3e2625692c4bbeaa1770d127efba1fcdfdbec0f1 Mon Sep 17 00:00:00 2001 From: CWX Date: Sat, 1 Feb 2025 22:59:03 +0000 Subject: [PATCH] fix out of bounds issue when moving to another page --- Libraries/Core/Controllers/RagfairController.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Libraries/Core/Controllers/RagfairController.cs b/Libraries/Core/Controllers/RagfairController.cs index f8e1a469..c5eda5ac 100644 --- a/Libraries/Core/Controllers/RagfairController.cs +++ b/Libraries/Core/Controllers/RagfairController.cs @@ -184,7 +184,7 @@ public class RagfairController { var start = searchRequest.Page * searchRequest.Limit; var end = (int)Math.Min((double)((searchRequest.Page + 1) * searchRequest.Limit), result.Offers.Count); - result.Offers = result.Offers.Slice(start.Value, end); + result.Offers = result.Offers.Slice(start.Value, end - start.Value); } return result;