fix out of bounds issue when moving to another page

This commit is contained in:
CWX
2025-02-01 22:59:03 +00:00
parent 462579f33e
commit 3e2625692c
@@ -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;