server: prevent out of bounds index at end of processing
This commit is contained in:
parent
f12979c0be
commit
1eb498712b
@ -977,6 +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());
|
||||||
&ids[..limit]
|
&ids[..limit]
|
||||||
} else {
|
} else {
|
||||||
&ids[..]
|
&ids[..]
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user