From 6e3af2095771482646705cfef07088832656b81c Mon Sep 17 00:00:00 2001 From: gngpp Date: Wed, 7 Feb 2024 23:03:24 +0800 Subject: [PATCH] fix(arkose): Image chunks processing prevents division by 0 --- crates/openai/src/arkose/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/openai/src/arkose/mod.rs b/crates/openai/src/arkose/mod.rs index cc84cd6dc..78d6b0421 100644 --- a/crates/openai/src/arkose/mod.rs +++ b/crates/openai/src/arkose/mod.rs @@ -577,7 +577,7 @@ async fn submit_funcaptcha( for data in classified_data { let images_chunks = data .1 - .chunks(arkose_solver.limit) + .chunks(arkose_solver.limit.max(1)) .map(|item| { item.iter() .map(|item| &item.image)