From 987bd783cf13c93104d10ff0355a43c4baaf6ef5 Mon Sep 17 00:00:00 2001 From: miko <1059665047@qq.com> Date: Wed, 25 Dec 2024 16:20:06 +0800 Subject: [PATCH] =?UTF-8?q?GifCaptcha.setRepeat=E8=AE=BE=E7=BD=AE=E6=97=A0?= =?UTF-8?q?=E6=95=88=E5=80=BC=EF=BC=8C=E5=BA=94=E8=AF=A5=E4=BF=9D=E6=8C=81?= =?UTF-8?q?=E4=B8=BA=200?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/cn/hutool/captcha/GifCaptcha.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/hutool-captcha/src/main/java/cn/hutool/captcha/GifCaptcha.java b/hutool-captcha/src/main/java/cn/hutool/captcha/GifCaptcha.java index 7da77496c..d32c195d3 100755 --- a/hutool-captcha/src/main/java/cn/hutool/captcha/GifCaptcha.java +++ b/hutool-captcha/src/main/java/cn/hutool/captcha/GifCaptcha.java @@ -113,9 +113,7 @@ public class GifCaptcha extends AbstractCaptcha { * @return this */ public GifCaptcha setRepeat(int repeat) { - if (repeat >= 0) { - this.repeat = repeat; - } + this.repeat = Math.max(repeat, 0); return this; }