add fix for limit if negative

This commit is contained in:
askiiart 2024-12-01 22:37:59 -06:00
parent 01c9984d99
commit 8c15ac8a0e
Signed by untrusted user who does not match committer: askiiart
GPG key ID: EA85979611654C30

View file

@ -67,6 +67,9 @@ impl SearchForm {
if limit > conf.caps.limits.max {
limit = conf.caps.limits.max;
}
if limit < 1 {
limit = 1
}
return InternalSearchParameters {
q: self.q.clone(),