mirror of
https://github.com/lempamo/Project-Unite.git
synced 2025-01-22 17:22:15 +00:00
Oh....duh...
This commit is contained in:
parent
398fbffb89
commit
724b9a0545
2 changed files with 3 additions and 1 deletions
|
@ -351,7 +351,7 @@ public static T[] GetItemsOnPage<T>(this T[] collection, int page, int pageSize)
|
|||
{
|
||||
List<T> obj = new List<T>();
|
||||
|
||||
for(int i = pageSize * page; i < pageSize + (pageSize * page) + 1 && i < collection.Count(); i++)
|
||||
for(int i = pageSize * page; i < pageSize + (pageSize * page) && i < collection.Count(); i++)
|
||||
{
|
||||
obj.Add(collection[i]);
|
||||
}
|
||||
|
|
|
@ -25,6 +25,8 @@ public ActionResult Pong(int id = 1)
|
|||
});
|
||||
}
|
||||
|
||||
id = id - 1;
|
||||
|
||||
int pagecount = highscores.GetPageCount(10);
|
||||
if (id > pagecount || id < 1)
|
||||
return new HttpStatusCodeResult(HttpStatusCode.BadRequest);
|
||||
|
|
Loading…
Reference in a new issue