Skip to content
Snippets Groups Projects
Commit 6f2237df authored by Janis Daniel Dähne's avatar Janis Daniel Dähne
Browse files

- fixed potential issue where we try to skip a negative amount when paging

parent 0b5208b6
No related branches found
No related tags found
No related merge requests found
...@@ -13,7 +13,7 @@ namespace ClientServer.Helpers ...@@ -13,7 +13,7 @@ namespace ClientServer.Helpers
/// </summary> /// </summary>
public static class Constants public static class Constants
{ {
public static string VersionString = "2.5.10"; public static string VersionString = "2.5.11";
/// <summary> /// <summary>
/// this is only set once at program.cs!! /// this is only set once at program.cs!!
......
...@@ -111,7 +111,8 @@ namespace ClientServer.Helpers ...@@ -111,7 +111,8 @@ namespace ClientServer.Helpers
SearchText = searchText //just to forge the obj SearchText = searchText //just to forge the obj
}; };
int skip = (page-1) * pageSize; //this could get negative... if frontend gives bad values
int skip = Math.Max(0, (page-1) * pageSize);
var pagedQuery = query; var pagedQuery = query;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment