Oh....duh...

This commit is contained in:
Michael 2017-05-02 16:45:01 -04:00
parent 398fbffb89
commit 724b9a0545
2 changed files with 3 additions and 1 deletions

View file

@ -351,7 +351,7 @@ namespace Project_Unite.Controllers
{ {
List<T> obj = new List<T>(); 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]); obj.Add(collection[i]);
} }

View file

@ -25,6 +25,8 @@ namespace Project_Unite.Controllers
}); });
} }
id = id - 1;
int pagecount = highscores.GetPageCount(10); int pagecount = highscores.GetPageCount(10);
if (id > pagecount || id < 1) if (id > pagecount || id < 1)
return new HttpStatusCodeResult(HttpStatusCode.BadRequest); return new HttpStatusCodeResult(HttpStatusCode.BadRequest);