GifCaptcha.setRepeat设置无效值,应该保持为 0

This commit is contained in:
miko 2024-12-25 16:20:06 +08:00
parent 416f0f3fa7
commit 987bd783cf

View File

@ -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;
}