Skip to content

Commit 987bd78

Browse files
author
miko
committed
GifCaptcha.setRepeat设置无效值,应该保持为 0
1 parent 416f0f3 commit 987bd78

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

hutool-captcha/src/main/java/cn/hutool/captcha/GifCaptcha.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -113,9 +113,7 @@ public GifCaptcha setQuality(int quality) {
113113
* @return this
114114
*/
115115
public GifCaptcha setRepeat(int repeat) {
116-
if (repeat >= 0) {
117-
this.repeat = repeat;
118-
}
116+
this.repeat = Math.max(repeat, 0);
119117
return this;
120118
}
121119

0 commit comments

Comments
 (0)