server: properly limit index

This commit is contained in:
Bill Thiede 2025-04-24 09:04:22 -07:00
parent 956c20b156
commit f86a5f464d

View File

@ -977,7 +977,7 @@ pub async fn label_unprocessed(
info!("Loaded {} rules", rules.len()); info!("Loaded {} rules", rules.len());
let ids = if let Some(limit) = limit { let ids = if let Some(limit) = limit {
let limit = limit.max(ids.len()); let limit = limit.min(ids.len());
&ids[..limit] &ids[..limit]
} else { } else {
&ids[..] &ids[..]